My Project
|
Represents signon for client application. More...
#include <SignOn/AuthService>
Classes | |
class | IdentityRegExp |
The class represents a regular expression. More... | |
Public Types | |
enum | ServiceError { UnknownError = 1 , InternalServerError = 2 , InternalCommunicationError = 3 , PermissionDeniedError = 4 , AuthServiceErr = 100 , MethodNotKnownError , NotAvailableError , InvalidQueryError } |
Codes for errors that may be reported by AuthService objects. More... | |
enum | IdentityFilterCriteria { AuthMethod = 0 , Username , Realm , Caption } |
Criterias for idetity query filtering. More... | |
typedef QMap< IdentityFilterCriteria, IdentityRegExp > | IdentityFilter |
Map to hold different filtering options. | |
Signals | |
void | error (const SignOn::Error &err) |
Emitted when an error occurs while using the AuthService. More... | |
void | methodsAvailable (const QStringList &methods) |
Emitted when the list of available authentication methods have been obtained from the service. More... | |
void | mechanismsAvailable (const QString &method, const QStringList &mechanisms) |
Emitted when the list of available mechanisms have been obtained from the service. More... | |
void | identities (const QList< SignOn::IdentityInfo > &identityList) |
Lists identities available on the server matching query parameters. More... | |
void | cleared () |
Database is cleared and reset to initial state. More... | |
Public Member Functions | |
AuthService (QObject *parent=0) | |
Basic constructor. More... | |
~AuthService () | |
Destructor. | |
void | queryMethods () |
Requests the information on available authentication methods. More... | |
void | queryMechanisms (const QString &method) |
Requests the information on mechanisms which are available for certain authentication type. More... | |
void | queryIdentities (const IdentityFilter &filter=IdentityFilter()) |
Requests information on identities which are stored. More... | |
void | clear () |
Clears credentials database. More... | |
Represents signon for client application.
The class is for managing identities. Most applications can use this by using widgets from libSignOnUI.
Definition at line 49 of file authservice.h.
Criterias for idetity query filtering.
Definition at line 78 of file authservice.h.
Codes for errors that may be reported by AuthService objects.
Definition at line 62 of file authservice.h.
SignOn::AuthService::AuthService | ( | QObject * | parent = 0 | ) |
void SignOn::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.
Definition at line 61 of file authservice.cpp.
|
signal |
Database is cleared and reset to initial state.
This signal is emitted in response to clear().
|
signal |
Emitted when an error occurs while using the AuthService.
Typical error types are generic errors, where Error::type() < Error::AuthServiceErr and AuthService specific, where Error::AuthServiceErr < Error::type() < Error::IdentityErr
err | The error object |
|
signal |
Lists identities available on the server matching query parameters.
This signal is emitted in response to queryIdentities().
identityList | list of identities information |
|
signal |
Emitted when the list of available mechanisms have been obtained from the service.
method | Name of authentication method that was queried |
mechanisms | List of available mechanisms |
|
signal |
Emitted when the list of available authentication methods have been obtained from the service.
methods | List of available authentication method names |
void SignOn::AuthService::queryIdentities | ( | const 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 default parameter is passed, all the identities are returned. @credential keychain-access key-chain application can access list of identities. |
Definition at line 56 of file authservice.cpp.
void SignOn::AuthService::queryMechanisms | ( | const QString & | method | ) |
Requests the information on mechanisms which are available for certain authentication type.
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.
method | authetication method name |
Definition at line 51 of file authservice.cpp.
void SignOn::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().
Definition at line 46 of file authservice.cpp.