SignOn::AuthService Class
Represents signon for client application. More...
- Header:
#include <SignOn/AuthService> - CMake:
find_package(SignOnQt6 REQUIRED)
target_link_libraries(mytarget PRIVATE SignOnQt6::SignOnQt6) - Inherits: QObject
List of all members, including inherited members
Deprecated members
Public Types
Public Functions
- AuthService(QObject *parent = 0)
- ~AuthService()
- void clear()
- void queryIdentities(const SignOn::AuthService::IdentityFilter &filter = IdentityFilter())
- void queryMechanisms(const QString &method)
- void queryMethods()
Signals
- void cleared()
- void error(const SignOn::Error &err)
- void identities(const QList<SignOn::IdentityInfo> &identityList)
- void mechanismsAvailable(const QString &method, const QStringList &mechanisms)
- void methodsAvailable(const QStringList &methods)
Detailed Description
The class is for managing identities. Most applications can use this by using widgets from libSignOnUI.
Member Type Documentation
AuthService::IdentityFilter
Map to hold different filtering options.
enum AuthService::IdentityFilterCriteria
Criteria for identity query filtering.
| Constant | Value | Description |
|---|---|---|
SignOn::AuthService::AuthMethod |
0 |
The authentication method. |
SignOn::AuthService::Username |
1 |
The username. |
SignOn::AuthService::Realm |
2 |
The realm. |
SignOn::AuthService::Caption |
3 |
The caption. |
See also queryIdentities()
Member Function Documentation
AuthService::AuthService(QObject *parent = 0)
Basic constructor, with the given parent.
[virtual noexcept] AuthService::~AuthService()
Destructor
void AuthService::clear()
Clears credentials database. All identity entries are removed from database. Signal cleared() is emitted when operation is completed. Error is reported by emitting signal error(). If the application does not have keychain-access credential, Error::type() is Error::PermissionDenied.
Needs the keychain-access credential: only a key-chain application can clear the database.
[signal] void AuthService::cleared()
Database is cleared and reset to initial state. This signal is emitted in response to clear().
[signal] void AuthService::error(const SignOn::Error &err)
Emitted when an error occurs while using the AuthService; err is the error. Typical error types are generic errors, where Error::type() < Error::AuthServiceErr and AuthService specific, where Error::AuthServiceErr < Error::type() < Error::IdentityErr
See also SignOn::Error, SignOn::Error::ErrorType
[signal] void AuthService::identities(const QList<SignOn::IdentityInfo> &identityList)
Lists identities available on the server matching query parameters; identityList holds their information. This signal is emitted in response to queryIdentities().
[signal] void AuthService::mechanismsAvailable(const QString &method, const QStringList &mechanisms)
Emitted when the list of available mechanisms have been obtained from the service for the queried authentication method.
[signal] void AuthService::methodsAvailable(const QStringList &methods)
Emitted when the list of available authentication methods have been obtained from the service; methods are their names.
void AuthService::queryIdentities(const SignOn::AuthService::IdentityFilter &filter = IdentityFilter())
Requests information on identities which are stored. The list of identities retrieved from the service is emitted with signal identities(). Error is reported by emitting signal error(). If filter is not valid, Error::type() is Error::InvalidQuery. If the application does not have keychain-access credential, Error::type() is Error::PermissionDenied.
filter shows only identities specified in filter - filtering not implemented for the moment. If the default parameter is passed, all the identities are returned.
Needs the keychain-access credential: only a key-chain application can access the list of identities.
See also identities(), error()
void AuthService::queryMechanisms(const QString &method)
Requests the information on mechanisms which are available for the authentication method. The list of mechanisms retrieved from the service is emitted with signal mechanismsAvailable(). Error is reported by emitting signal error(). If method is not a valid method, Error::type() is Error::MethodNotKnown.
See also mechanismsAvailable(), error()
void AuthService::queryMethods()
Requests the information on available authentication methods. The list of service types retrieved is emitted with signal methodsAvailable(). Error is reported by emitting signal error().
See also methodsAvailable(), error()