My Project: SignOn::IdentityInfo Class Reference

My Project

Public Types | Public Member Functions | List of all members
SignOn::IdentityInfo Class Reference

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.
void | setId (const quint32 id)
| Sets the numeric identifier for the credentials record.
quint32 | id () const
| Returns the identity identifier.
void | setSecret (const QString &secret, const bool storeSecret=true)
| Sets the secret.
QString | secret () const
| Gets 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 system tokens, therefore defining the applications that will be able to access this specific set of credentials.
void | setAccessControlList (const SecurityContextList &accessControlList)
| Sets the list of access control 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 system tokens defining the applications that are able to access this specific set of credentials.
SecurityContextList | accessControlListFull () 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.

## Detailed Description

Contains identity information.

This information is stored into database.

See also
  queryIdentities()

Definition at line 64 of file identityinfo.h.

## Member Enumeration Documentation

## ◆ CredentialsType

enum SignOn::IdentityInfo::CredentialsType

Values used to describe the type of the identity.

Attention
  Mixed types, i.e Application|Web are not yet supported. Just single types work for the time being.

Definition at line 76 of file identityinfo.h.

## Constructor & Destructor Documentation

## ◆ IdentityInfo() [1/3]

SignOn::IdentityInfo::IdentityInfo | ( |  | ) |

Creates a new empty IdentityInfo object.

Definition at line 35 of file identityinfo.cpp.

## ◆ IdentityInfo() [2/3]

SignOn::IdentityInfo::IdentityInfo | ( | const IdentityInfo & | other | ) |

Copy constructor.

Definition at line 45 of file identityinfo.cpp.

## ◆ IdentityInfo() [3/3]

SignOn::IdentityInfo::IdentityInfo | ( | const QString & | caption,
|  | const QString & | userName,
|  | const QMap< MethodName, MechanismsList > & | methods )

Creates a new IdentityInfo object with given values.

Parameters

  caption | Description of identity
  userName | Username
  methods | Allowed methods for identity

Definition at line 57 of file identityinfo.cpp.

References caption(), methods(), and userName().

## ◆ ~IdentityInfo()

SignOn::IdentityInfo::~IdentityInfo | ( |  | ) |

Destructor.

Definition at line 67 of file identityinfo.cpp.

## Member Function Documentation

## ◆ accessControlList()

QStringList SignOn::IdentityInfo::accessControlList | ( |  | ) | const

Gets the list of access control system tokens defining the applications that are able to access this specific set of credentials.

Attention
  This is accessible only to the owner application.

Returns
  The access control system tokens which defines the applications allowed to access this set of credentials.

Definition at line 133 of file identityinfo.cpp.

References accessControlList().

Referenced by accessControlList(), setAccessControlList(), and setAccessControlList().

## ◆ accessControlListFull()

SecurityContextList SignOn::IdentityInfo::accessControlListFull | ( |  | ) | const

Gets the list of access control application tokens defining the applications that are able to access this specific set of credentials.

Attention
  This is accessible only to the owner application.

Returns
  The access control tokens which defines the applications allowed to access this set of credentials.

Definition at line 149 of file identityinfo.cpp.

## ◆ caption()

const QString SignOn::IdentityInfo::caption | ( |  | ) | const

Returns a human-readable representation of the identity.

Returns
  Human-readable representation of the identity.

Definition at line 98 of file identityinfo.cpp.

Referenced by IdentityInfo(), and setCaption().

## ◆ id()

quint32 SignOn::IdentityInfo::id | ( |  | ) | const

Returns the identity identifier.

Returns
  Identifier for the identity

Definition at line 78 of file identityinfo.cpp.

## ◆ isStoringSecret()

bool SignOn::IdentityInfo::isStoringSecret | ( |  | ) | const

Returns whether secret is to be stored.

Returns
  true Whether the secret is being stored or not.

Definition at line 165 of file identityinfo.cpp.

## ◆ mechanisms()

MechanismsList SignOn::IdentityInfo::mechanisms | ( | const MethodName & | method | ) | const

Lists the all mechanisms for certain method in identity info.

Parameters

  method | Method name to list mechanisms

Returns
  List of mechanisms

Definition at line 201 of file identityinfo.cpp.

## ◆ methods()

QList< MethodName > SignOn::IdentityInfo::methods | ( |  | ) | const

Lists all methods in identity info.

Returns
  Param method method name to remove.

Definition at line 196 of file identityinfo.cpp.

Referenced by IdentityInfo().

## ◆ operator=()

IdentityInfo & SignOn::IdentityInfo::operator= | ( | const IdentityInfo & | other | ) |

Assignment operator.

Definition at line 51 of file identityinfo.cpp.

## ◆ owner()

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.

Attention
  This is accessible only to the owner application.

Returns
  The access control token which defines the applications allowed to modify this set of credentials.

Definition at line 118 of file identityinfo.cpp.

## ◆ realms()

QStringList SignOn::IdentityInfo::realms | ( |  | ) | const

Gets the realms, e.g.

URL's with which the Identity using this IdentityInfo works with.

Returns
  List of supported realms.

Definition at line 108 of file identityinfo.cpp.

Referenced by setRealms().

## ◆ refCount()

qint32 SignOn::IdentityInfo::refCount | ( |  | ) | const

Retrieves the refcount from identity info.

Returns
  Refcount for this IdentityInfo

Definition at line 213 of file identityinfo.cpp.

Referenced by setRefCount().

## ◆ removeMethod()

void SignOn::IdentityInfo::removeMethod | ( | const MethodName & | method | ) |

Removes a method from identity info.

Parameters

  method | Method name to remove

Definition at line 181 of file identityinfo.cpp.

## ◆ secret()

QString SignOn::IdentityInfo::secret | ( |  | ) | const

Gets the secret.

If this object was retrieved from the database, the returned secret might be an empty string.

Returns
  The secret, when allowed, or an empty string.

Definition at line 154 of file identityinfo.cpp.

Referenced by setSecret().

## ◆ setAccessControlList() [1/2]

void SignOn::IdentityInfo::setAccessControlList | ( | const QStringList & | accessControlList | ) |

Sets the list of access control system tokens, therefore defining the applications that will be able to access this specific set of credentials.

Parameters

  accessControlList | List of access control system tokens

Definition at line 123 of file identityinfo.cpp.

References accessControlList().

## ◆ setAccessControlList() [2/2]

void SignOn::IdentityInfo::setAccessControlList | ( | const SecurityContextList & | accessControlList | ) |

Sets the list of access control tokens, therefore defining the applications that will be able to access this specific set of credentials.

Parameters

  accessControlList | List of access control tokens

Definition at line 144 of file identityinfo.cpp.

References accessControlList().

## ◆ setCaption()

void SignOn::IdentityInfo::setCaption | ( | const QString & | caption | ) |

Sets a human readable caption of the identity.

Parameters

  caption | Caption

Definition at line 93 of file identityinfo.cpp.

References caption().

## ◆ setId()

void SignOn::IdentityInfo::setId | ( | const quint32 | id | ) |

Sets the numeric identifier for the credentials record.

Calling this method makes only sense when handling the Identity::credentialsStored() signal.

Parameters

  id | The numeric identifier of the credentials.

Definition at line 73 of file identityinfo.cpp.

## ◆ setMethod()

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.

Parameters

  method | Method name to change
  mechanismsList | list of mechanisms that are allowed

Definition at line 175 of file identityinfo.cpp.

## ◆ setOwner()

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.

Parameters

  ownerToken | owner token

Definition at line 113 of file identityinfo.cpp.

## ◆ setRealms()

void SignOn::IdentityInfo::setRealms | ( | const QStringList & | realms | ) |

Sets the realms, e.g.

URL's with which the Identity using this IdentityInfo shall work with.

Parameters

  realms | List of the realms to be set.

Definition at line 103 of file identityinfo.cpp.

References realms().

## ◆ setRefCount()

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.

Note
  Server can restrict changes to differ +-1 from previous.

Parameters

  refCount | Set refcount

Definition at line 206 of file identityinfo.cpp.

References refCount().

## ◆ setSecret()

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().

See also
  PluginInterface::secretKey
  PluginInterface::challenge

Parameters

  secret |
  storeSecret | Whether the secret is stored or not

Definition at line 159 of file identityinfo.cpp.

References secret().

## ◆ setStoreSecret()

void SignOn::IdentityInfo::setStoreSecret | ( | const bool | storeSecret | ) |

Sets whether the secret is stored or not.

Parameters

  storeSecret | Whether the secret must be stored in the DB.

Definition at line 170 of file identityinfo.cpp.

## ◆ setType()

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.

Attention
  If this method is not called, the IdentityInfo type will default to SignOn::OtherIdentity.

Parameters

  type | Type we want to assign to this IdentityInfo

Definition at line 186 of file identityinfo.cpp.

References type().

## ◆ setUserName()

void SignOn::IdentityInfo::setUserName | ( | const QString & | userName | ) |

Sets the username.

See also
  userNameKey

Parameters

  userName | Username

Definition at line 83 of file identityinfo.cpp.

References userName().

## ◆ type()

IdentityInfo::CredentialsType SignOn::IdentityInfo::type | ( |  | ) | const

Retrieves the identity type from identity info.

Returns
  The identity type for this IdentityInfo

Definition at line 191 of file identityinfo.cpp.

Referenced by setType().

## ◆ userName()

const QString SignOn::IdentityInfo::userName | ( |  | ) | const

Returns the username.

Returns
  Username for the identity

Definition at line 88 of file identityinfo.cpp.

Referenced by IdentityInfo(), and setUserName().

The documentation for this class was generated from the following files:

- identityinfo.h
- identityinfo.cpp