26 #include "libsignoncommon.h"
27 #include "identityinfo.h"
28 #include "identityinfoimpl.h"
34 impl(new IdentityInfoImpl(this))
36 qRegisterMetaType<IdentityInfo>(
"SignOn::IdentityInfo");
38 if (qMetaTypeId<IdentityInfo>() < QMetaType::User)
39 BLAME() <<
"IdentityInfo::IdentityInfo() - "
40 "IdentityInfo meta type not registered.";
43 impl->m_storeSecret =
false;
47 impl(new IdentityInfoImpl(this))
49 impl->copy(*(other.impl));
54 impl->copy(*(other.impl));
59 const QString &userName,
60 const QMap<MethodName, MechanismsList> &methods):
61 impl(new IdentityInfoImpl(this))
65 impl->m_isEmpty =
false;
71 if (impl)
delete impl;
88 impl->m_isEmpty =
false;
93 return impl->m_userName;
99 impl->m_isEmpty =
false;
104 return impl->m_caption;
114 return impl->m_realms;
119 impl->m_owner = ownerToken;
124 return impl->m_owner;
130 impl->m_isEmpty =
false;
135 return impl->m_accessControlList;
140 return impl->m_secret;
146 impl->m_storeSecret = storeSecret;
147 impl->m_isEmpty =
false;
152 return impl->m_storeSecret;
157 impl->m_storeSecret = storeSecret;
163 if (impl->hasMethod(method))
164 impl->updateMethod(method, mechanismsList);
166 impl->addMethod(method, mechanismsList);
171 impl->removeMethod(method);
186 return impl->m_authMethods.keys();
191 return impl->m_authMethods.value(method, QStringList());
196 impl->setRefCount(refCount);
201 return impl->refCount();
QStringList MechanismsList
Defines a string list as a list of mechanisms.
const QString caption() const
Returns a human-readable representation of the identity.
QString MethodName
Defines a string as an authentication method.
CredentialsType
Values used to describe the type of the identity.
QStringList accessControlList() const
Gets the list of access control application tokens defining the applications that are able to access ...
quint32 id() const
Returns the identity identifier.
void setUserName(const QString &userName)
Sets the username.
IdentityInfo()
Creates a new empty IdentityInfo object.
void setSecret(const QString &secret, const bool storeSecret=true)
Sets the secret.
void setMethod(const MethodName &method, const MechanismsList &mechanismsList)
Sets the method into identity info.
const QString userName() const
Returns the username.
QString owner() const
Gets the owner application token that is defining the applications that are able to modify this speci...
void setAccessControlList(const QStringList &accessControlList)
Sets the list of access control application tokens, therefore defining the applications that will be ...
bool isStoringSecret() const
Returns whether secret is to be stored.
IdentityInfo & operator=(const IdentityInfo &other)
Assignment operator.
Contains identity information.
void setType(CredentialsType type)
Sets the type into identity info.
QString secret() const
Gets the secret.
void setCaption(const QString &caption)
Sets a human readable caption of the identity.
void setRefCount(qint32 refCount)
Sets the refcount into identity info.
MechanismsList mechanisms(const MethodName &method) const
Lists the all mechanisms for certain method in identity info.
QList< MethodName > methods() const
Lists all methods in identity info.
qint32 refCount() const
Retrieves the refcount from identity info.
~IdentityInfo()
Destructor.
QStringList realms() const
Gets the realms, e.g.
void removeMethod(const MethodName &method)
Removes a method from identity info.
CredentialsType type() const
Retrieves the identity type from identity info.
void setOwner(const QString &ownerToken)
Sets application token that owns identity, therefore defining the applications that will be able to m...
void setRealms(const QStringList &realms)
Sets the realms, e.g.
void setId(const quint32 id)
Sets the numeric identifier for the credentials record.
void setStoreSecret(const bool storeSecret)
Sets whether the secret is stored or not.