Contains identity information. More...
#include <SignOn/IdentityInfo>
Public Types | |
enum | CredentialsType { Other = 0, Application = 1 << 0, Web = 1 << 1, Network = 1 << 2 } |
Values used to describe the type of the identity. More... |
Public Member Functions | |
IdentityInfo () | |
Creates a new empty IdentityInfo object. | |
IdentityInfo (const IdentityInfo &other) | |
Copy constructor. | |
IdentityInfo & | operator= (const IdentityInfo &other) |
Assignment operator. | |
IdentityInfo (const QString &caption, const QString &userName, const QMap< MethodName, MechanismsList > &methods) | |
Creates a new IdentityInfo object with given values. | |
~IdentityInfo () | |
Destructor. | |
quint32 | id () const |
Returns the identity identifier. | |
void | setSecret (const QString &secret, const bool storeSecret=true) |
Sets the secret. | |
bool | isStoringSecret () const |
Returns whether secret is to be stored. | |
void | setStoreSecret (const bool storeSecret) |
Sets whether the secret is stored or not. | |
void | setUserName (const QString &userName) |
Sets the username. | |
const QString | userName () const |
Returns the username. | |
void | setCaption (const QString &caption) |
Sets a human readable caption of the identity. | |
const QString | caption () const |
Returns a human-readable representation of the identity. | |
void | setRealms (const QStringList &realms) |
Sets the realms, e.g. | |
QStringList | realms () const |
Gets the realms, e.g. | |
void | setOwner (const QString &ownerToken) |
Sets application token that owns identity, therefore defining the applications that will be able to modify this specific set of credentials. | |
QString | owner () const |
Gets the owner application token that is defining the applications that are able to modify this specific set of credentials. | |
void | setAccessControlList (const QStringList &accessControlList) |
Sets the list of access control application tokens, therefore defining the applications that will be able to access this specific set of credentials. | |
QStringList | accessControlList () const |
Gets the list of access control application tokens defining the applications that are able to access this specific set of credentials. | |
void | setMethod (const MethodName &method, const MechanismsList &mechanismsList) |
Sets the method into identity info. | |
void | removeMethod (const MethodName &method) |
Removes a method from identity info. | |
void | setType (CredentialsType type) |
Sets the type into identity info. | |
CredentialsType | type () const |
Retrieves the identity type from identity info. | |
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. | |
void | setRefCount (qint32 refCount) |
Sets the refcount into identity info. | |
qint32 | refCount () const |
Retrieves the refcount from identity info. |
Contains identity information.
This information is stored into database.
Definition at line 57 of file identityinfo.h.
Values used to describe the type of the identity.
Definition at line 69 of file identityinfo.h.
SignOn::IdentityInfo::IdentityInfo | ( | const QString & | caption, |
const QString & | userName, | ||
const QMap< MethodName, MechanismsList > & | methods | ||
) |
Creates a new IdentityInfo object with given values.
caption | Description of identity |
userName | Username |
methods | Allowed methods for identity |
Definition at line 58 of file identityinfo.cpp.
References caption(), methods(), and userName().
QStringList SignOn::IdentityInfo::accessControlList | ( | ) | const |
Gets the list of access control application tokens defining the applications that are able to access this specific set of credentials.
Definition at line 131 of file identityinfo.cpp.
Referenced by setAccessControlList().
const QString SignOn::IdentityInfo::caption | ( | ) | const |
Returns a human-readable representation of the identity.
Definition at line 101 of file identityinfo.cpp.
Referenced by IdentityInfo(), and setCaption().
quint32 SignOn::IdentityInfo::id | ( | ) | const |
Returns the identity identifier.
Definition at line 80 of file identityinfo.cpp.
bool SignOn::IdentityInfo::isStoringSecret | ( | ) | const |
Returns whether secret is to be stored.
Definition at line 148 of file identityinfo.cpp.
MechanismsList SignOn::IdentityInfo::mechanisms | ( | const MethodName & | method | ) | const |
Lists the all mechanisms for certain method in identity info.
method | Method name to list mechanisms |
Definition at line 187 of file identityinfo.cpp.
QList< MethodName > SignOn::IdentityInfo::methods | ( | ) | const |
Lists all methods in identity info.
Definition at line 182 of file identityinfo.cpp.
Referenced by IdentityInfo().
QString SignOn::IdentityInfo::owner | ( | ) | const |
Gets the owner application token that is defining the applications that are able to modify this specific set of credentials.
Definition at line 121 of file identityinfo.cpp.
QStringList SignOn::IdentityInfo::realms | ( | ) | const |
Gets the realms, e.g.
URL's with which the Identity using this IdentityInfo works with.
Definition at line 111 of file identityinfo.cpp.
Referenced by setRealms().
qint32 SignOn::IdentityInfo::refCount | ( | ) | const |
Retrieves the refcount from identity info.
Definition at line 197 of file identityinfo.cpp.
void SignOn::IdentityInfo::removeMethod | ( | const MethodName & | method | ) |
Removes a method from identity info.
method | Method name to remove |
Definition at line 167 of file identityinfo.cpp.
void SignOn::IdentityInfo::setAccessControlList | ( | const QStringList & | accessControlList | ) |
Sets the list of access control application tokens, therefore defining the applications that will be able to access this specific set of credentials.
accessControlList | List of access control tokens |
Definition at line 126 of file identityinfo.cpp.
References accessControlList().
void SignOn::IdentityInfo::setCaption | ( | const QString & | caption | ) |
Sets a human readable caption of the identity.
caption | Caption |
Definition at line 96 of file identityinfo.cpp.
References caption().
void SignOn::IdentityInfo::setMethod | ( | const MethodName & | method, |
const MechanismsList & | mechanismsList | ||
) |
Sets the method into identity info.
If the given method is not included, a new one will be added. If it is already set, the mechanism list assosiated to it is updated. an empty list will clear the mechanisms. These values are used to limit Identity to use the specified methods and mechanisms.
method | Method name to change |
mechanismsList | list of mechanisms that are allowed |
Definition at line 158 of file identityinfo.cpp.
void SignOn::IdentityInfo::setOwner | ( | const QString & | ownerToken | ) |
Sets application token that owns identity, therefore defining the applications that will be able to modify this specific set of credentials.
ownerToken | owner token |
Definition at line 116 of file identityinfo.cpp.
void SignOn::IdentityInfo::setRealms | ( | const QStringList & | realms | ) |
Sets the realms, e.g.
URL's with which the Identity using this IdentityInfo shall work with.
realms | List of the realms to be set. |
Definition at line 106 of file identityinfo.cpp.
References realms().
void SignOn::IdentityInfo::setRefCount | ( | qint32 | refCount | ) |
Sets the refcount into identity info.
The type is used to generically identify where this identity is being used.
refCount | Set refcount |
Definition at line 192 of file identityinfo.cpp.
void SignOn::IdentityInfo::setSecret | ( | const QString & | secret, |
const bool | storeSecret = true |
||
) |
Sets the secret.
When performing a challenge on the owner Identity object, if the secret is set on its corresponding IdentityInfo, it will be added to the parameter list that is passed to the corresponding authentication plugin challenge implementation. By default a newly created IdentityInfo does not contain a secret and has a policy of not storing any. If the secret is set the default policy will be to store it. This behaviour can also be set with IdentityInfo::setStoreSecret().
secret | |
storeSecret | Whether the secret is stored or not |
Definition at line 141 of file identityinfo.cpp.
void SignOn::IdentityInfo::setStoreSecret | ( | const bool | storeSecret | ) |
Sets whether the secret is stored or not.
storeSecret | Whether the secret must be stored in the DB. |
Definition at line 153 of file identityinfo.cpp.
void SignOn::IdentityInfo::setType | ( | IdentityInfo::CredentialsType | type | ) |
Sets the type into identity info.
The type is used to generically identify where this identity is being used.
type | Type we want to assign to this IdentityInfo |
Definition at line 172 of file identityinfo.cpp.
void SignOn::IdentityInfo::setUserName | ( | const QString & | userName | ) |
Sets the username.
userName | Username |
Definition at line 85 of file identityinfo.cpp.
References userName().
IdentityInfo::CredentialsType SignOn::IdentityInfo::type | ( | ) | const |
Retrieves the identity type from identity info.
Definition at line 177 of file identityinfo.cpp.
const QString SignOn::IdentityInfo::userName | ( | ) | const |
Returns the username.
Definition at line 91 of file identityinfo.cpp.
Referenced by IdentityInfo(), and setUserName().