SignOn::IdentityInfo Class
Contains identity information. More...
- Header:
#include <SignOn/IdentityInfo> - CMake:
find_package(SignOnQt6 REQUIRED)
target_link_libraries(mytarget PRIVATE SignOnQt6::SignOnQt6)
List of all members, including inherited members
Public Types
Public Functions
- IdentityInfo()
- IdentityInfo(const QString &caption, const QString &userName, const QMap<SignOn::MethodName, SignOn::MechanismsList> &methods)
- IdentityInfo(const SignOn::IdentityInfo &other)
- ~IdentityInfo()
- QStringList accessControlList() const
- SignOn::SecurityContextList accessControlListFull() const
- const QString caption() const
- quint32 id() const
- bool isStoringSecret() const
- SignOn::MechanismsList mechanisms(const SignOn::MethodName &method) const
- QList<SignOn::MethodName> methods() const
- QString owner() const
- QStringList realms() const
- qint32 refCount() const
- void removeMethod(const SignOn::MethodName &method)
- QString secret() const
- void setAccessControlList(const QStringList &accessControlList)
- void setAccessControlList(const SignOn::SecurityContextList &accessControlList)
- void setCaption(const QString &caption)
- void setId(const quint32 id)
- void setMethod(const SignOn::MethodName &method, const SignOn::MechanismsList &mechanismsList)
- void setOwner(const QString &ownerToken)
- void setRealms(const QStringList &realms)
- void setRefCount(qint32 refCount)
- void setSecret(const QString &secret, const bool storeSecret = true)
- void setStoreSecret(const bool storeSecret)
- void setType(SignOn::IdentityInfo::CredentialsType type)
- void setUserName(const QString &userName)
- SignOn::IdentityInfo::CredentialsType type() const
- const QString userName() const
- SignOn::IdentityInfo &IdentityInfo::operator=(const SignOn::IdentityInfo &other)
Detailed Description
This information is stored into database.
See also AuthService::queryIdentities()
Member Type Documentation
enum IdentityInfo::CredentialsType
Values used to describe the type of the identity
Note: Mixed types, i.e Application|Web are not yet supported. Just single types work for the time being.
| Constant | Value | Description |
|---|---|---|
SignOn::IdentityInfo::Other |
0 |
Any other use. |
SignOn::IdentityInfo::Application |
1 << 0 |
An application. |
SignOn::IdentityInfo::Web |
1 << 1 |
A web site. |
SignOn::IdentityInfo::Network |
1 << 2 |
A network service. |
Member Function Documentation
IdentityInfo::IdentityInfo()
Creates a new empty IdentityInfo object.
IdentityInfo::IdentityInfo(const QString &caption, const QString &userName, const QMap<SignOn::MethodName, SignOn::MechanismsList> &methods)
Creates a new IdentityInfo object with the description caption of the identity, the username userName and the methods allowed for the identity.
IdentityInfo::IdentityInfo(const SignOn::IdentityInfo &other)
Copy constructor, copying other.
[noexcept] IdentityInfo::~IdentityInfo()
Destructor
QStringList IdentityInfo::accessControlList() const
Gets the list of access control system tokens defining the applications that are able to access this specific set of credentials.
Note: 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.
See also setAccessControlList()
SignOn::SecurityContextList IdentityInfo::accessControlListFull() const
Gets the list of access control application tokens defining the applications that are able to access this specific set of credentials.
Note: This is accessible only to the owner application.
Returns the access control tokens which defines the applications allowed to access this set of credentials.
const QString IdentityInfo::caption() const
Returns a human-readable representation of the identity.
See also setCaption()
quint32 IdentityInfo::id() const
* Returns the identity identifier.
See also setId()
bool IdentityInfo::isStoringSecret() const
Returns whether the secret is being stored or not.
SignOn::MechanismsList IdentityInfo::mechanisms(const SignOn::MethodName &method) const
Lists all the mechanisms for method in identity info.
QList<SignOn::MethodName> IdentityInfo::methods() const
Lists all methods in identity info.
QString IdentityInfo::owner() const
Gets the owner application token that is defining the applications that are able to modify this specific set of credentials.
Note: This is accessible only to the owner application.
Returns the access control token which defines the applications allowed to modify this set of credentials.
See also setOwner()
QStringList IdentityInfo::realms() const
Gets the realms, e.g. URL's with which the Identity using this IdentityInfo works with.
Returns the list of supported realms.
See also setRealms()
qint32 IdentityInfo::refCount() const
Retrieves the refcount from identity info.
See also setRefCount()
void IdentityInfo::removeMethod(const SignOn::MethodName &method)
Removes the method from identity info.
QString 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.
See also setSecret()
void IdentityInfo::setAccessControlList(const QStringList &accessControlList)
Sets the list of access control system tokens accessControlList, therefore defining the applications that will be able to access this specific set of credentials.
See also accessControlList()
void IdentityInfo::setAccessControlList(const SignOn::SecurityContextList &accessControlList)
Sets the list of access control tokens accessControlList, therefore defining the applications that will be able to access this specific set of credentials.
This is an overloaded function.
void IdentityInfo::setCaption(const QString &caption)
Sets a human readable caption of the identity
See also caption()
void IdentityInfo::setId(const quint32 id)
Sets the numeric identifier for the credentials record to id. Calling this method makes only sense when handling the Identity::credentialsStored() signal.
See also id()
void IdentityInfo::setMethod(const SignOn::MethodName &method, const SignOn::MechanismsList &mechanismsList)
Sets the method into identity info, with the list of mechanisms that are allowed, mechanismsList. If the given method is not included, a new one will be added. If it is already set, the mechanism list associated 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.
void IdentityInfo::setOwner(const QString &ownerToken)
Sets the application token ownerToken that owns identity, therefore defining the applications that will be able to modify this specific set of credentials
See also owner()
void IdentityInfo::setRealms(const QStringList &realms)
Sets the realms, e.g. URL's with which the Identity using this IdentityInfo shall work with.
See also realms()
void IdentityInfo::setRefCount(qint32 refCount)
Sets the refcount into identity info to refCount. The type is used to generically identify where this identity is being used.
Note: Server can restrict changes to differ +-1 from previous.
See also refCount()
void 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().
storeSecret tells whether the secret is stored or not.
See also secret()
void IdentityInfo::setStoreSecret(const bool storeSecret)
Sets whether the secret must be stored in the DB to storeSecret.
void IdentityInfo::setType(SignOn::IdentityInfo::CredentialsType type)
Sets the type into identity info. The type is used to generically identify where this identity is being used.
Note: If this method is not called, the IdentityInfo type will default to SignOn::OtherIdentity.
See also type()
void IdentityInfo::setUserName(const QString &userName)
Sets the username to userName.
See also userName()
SignOn::IdentityInfo::CredentialsType IdentityInfo::type() const
Retrieves the identity type from identity info.
See also setType()
const QString IdentityInfo::userName() const
Returns the username for the identity.
See also setUserName()
SignOn::IdentityInfo &IdentityInfo::operator=(const SignOn::IdentityInfo &other)
Assignment operator, assigning other.
Related Non-Members
MechanismsList
Defines a string list as a list of mechanisms.
MethodName
Defines a string as an authentication method.
SecurityContextList
Defines a list of security contexts.