28 #include "libsignoncommon.h"
29 #include "identityinfo.h"
30 #include "identityinfoimpl.h"
36 impl(new IdentityInfoImpl)
38 qRegisterMetaType<IdentityInfo>(
"SignOn::IdentityInfo");
40 if (qMetaTypeId<IdentityInfo>() < QMetaType::User)
41 BLAME() <<
"IdentityInfo::IdentityInfo() - "
42 "IdentityInfo meta type not registered.";
46 impl(new IdentityInfoImpl)
58 const QString &userName,
59 const QMap<MethodName, MechanismsList> &methods):
60 impl(new IdentityInfoImpl)
69 if (impl)
delete impl;
90 return impl->userName();
100 return impl->caption();
110 return impl->realms();
115 impl->setOwners(QStringList() << ownerToken);
120 return impl->owners().value(0);
130 impl->setAccessControlList(list);
138 list.append(secCtx.systemContext());
151 return impl->accessControlList();
156 return impl->secret();
162 impl->setStoreSecret(storeSecret);
167 return impl->storeSecret();
172 impl->setStoreSecret(storeSecret);
178 impl->updateMethod(method, mechanismsList);
183 impl->removeMethod(method);
198 return impl->methods().keys();
203 return impl->methods().value(method, QStringList());
215 return impl->refCount();
Contains identity information.
void setCaption(const QString &caption)
Sets a human readable caption of the identity.
QStringList realms() const
Gets the realms, e.g.
~IdentityInfo()
Destructor.
CredentialsType type() const
Retrieves the identity type from identity info.
void setAccessControlList(const QStringList &accessControlList)
Sets the list of access control system tokens, therefore defining the applications that will be able ...
void setRefCount(qint32 refCount)
Sets the refcount into identity info.
void setType(CredentialsType type)
Sets the type into identity info.
void setSecret(const QString &secret, const bool storeSecret=true)
Sets the secret.
void removeMethod(const MethodName &method)
Removes a method from identity info.
QStringList accessControlList() const
Gets the list of access control system tokens defining the applications that are able to access this ...
void setId(const quint32 id)
Sets the numeric identifier for the credentials record.
QString owner() const
Gets the owner application token that is defining the applications that are able to modify this speci...
qint32 refCount() const
Retrieves the refcount from identity info.
IdentityInfo & operator=(const IdentityInfo &other)
Assignment operator.
SecurityContextList accessControlListFull() const
Gets the list of access control application tokens defining the applications that are able to access ...
void setRealms(const QStringList &realms)
Sets the realms, e.g.
void setUserName(const QString &userName)
Sets the username.
IdentityInfo()
Creates a new empty IdentityInfo object.
const QString caption() const
Returns a human-readable representation of the identity.
void setMethod(const MethodName &method, const MechanismsList &mechanismsList)
Sets the method into identity info.
QString secret() const
Gets the secret.
const QString userName() const
Returns the username.
void setStoreSecret(const bool storeSecret)
Sets whether the secret is stored or not.
quint32 id() const
Returns the identity identifier.
QList< MethodName > methods() const
Lists all methods in identity info.
MechanismsList mechanisms(const MethodName &method) const
Lists the all mechanisms for certain method in identity info.
CredentialsType
Values used to describe the type of the identity.
void setOwner(const QString &ownerToken)
Sets application token that owns identity, therefore defining the applications that will be able to m...
bool isStoringSecret() const
Returns whether secret is to be stored.
Contains access security context information.
QString MethodName
Defines a string as an authentication method.
QStringList MechanismsList
Defines a string list as a list of mechanisms.
QList< SecurityContext > SecurityContextList
Defines a list of security contexts.