27 #include "libsignoncommon.h" 28 #include "identityinfo.h" 29 #include "identityinfoimpl.h" 35 impl(new IdentityInfoImpl)
37 qRegisterMetaType<IdentityInfo>(
"SignOn::IdentityInfo");
39 if (qMetaTypeId<IdentityInfo>() < QMetaType::User)
40 BLAME() <<
"IdentityInfo::IdentityInfo() - " 41 "IdentityInfo meta type not registered.";
45 impl(new IdentityInfoImpl)
57 const QString &userName,
58 const QMap<MethodName, MechanismsList> &methods):
59 impl(new IdentityInfoImpl)
68 if (impl)
delete impl;
89 return impl->userName();
99 return impl->caption();
109 return impl->realms();
114 impl->setOwners(QStringList() << ownerToken);
119 return impl->owners().value(0);
129 return impl->accessControlList();
134 return impl->secret();
140 impl->setStoreSecret(storeSecret);
145 return impl->storeSecret();
150 impl->setStoreSecret(storeSecret);
156 impl->updateMethod(method, mechanismsList);
161 impl->removeMethod(method);
176 return impl->methods().keys();
181 return impl->methods().value(method, QStringList());
193 return impl->refCount();
QString secret() const
Gets the secret.
QStringList MechanismsList
Defines a string list as a list of mechanisms.
qint32 refCount() const
Retrieves the refcount from identity info.
QList< MethodName > methods() const
Lists all methods in identity info.
quint32 id() const
Returns the identity identifier.
QString MethodName
Defines a string as an authentication method.
const QString userName() const
Returns the username.
CredentialsType
Values used to describe the type of the identity.
QStringList realms() const
Gets the realms, e.g.
const QString caption() const
Returns a human-readable representation of the identity.
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.
MechanismsList mechanisms(const MethodName &method) const
Lists the all mechanisms for certain method in identity info.
void setMethod(const MethodName &method, const MechanismsList &mechanismsList)
Sets the method into identity info.
QStringList accessControlList() const
Gets the list of access control application tokens defining the applications that are able to access ...
void setAccessControlList(const QStringList &accessControlList)
Sets the list of access control application tokens, therefore defining the applications that will be ...
IdentityInfo & operator=(const IdentityInfo &other)
Assignment operator.
QString owner() const
Gets the owner application token that is defining the applications that are able to modify this speci...
Contains identity information.
void setType(CredentialsType type)
Sets the type into identity info.
bool isStoringSecret() const
Returns whether secret is to be stored.
CredentialsType type() const
Retrieves the identity type from identity info.
void setCaption(const QString &caption)
Sets a human readable caption of the identity.
void setRefCount(qint32 refCount)
Sets the refcount into identity info.
~IdentityInfo()
Destructor.
void removeMethod(const MethodName &method)
Removes a method 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.