My Project: SignOn::AuthService Class Reference

My Project

Classes | Public Types | Signals | Public Member Functions | List of all members
SignOn::AuthService Class Reference

Represents signon for client application. More...

`#include <SignOn/AuthService>`

Inheritance diagram for SignOn::AuthService:
[legend]

## 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.
void | methodsAvailable (const QStringList &methods)
| Emitted when the list of available authentication methods have been obtained from the service.
void | mechanismsAvailable (const QString &method, const QStringList &mechanisms)
| Emitted when the list of available mechanisms have been obtained from the service.
void | identities (const QList< SignOn::IdentityInfo > &identityList)
| Lists identities available on the server matching query parameters.
void | cleared ()
| Database is cleared and reset to initial state.

## Public Member Functions
| AuthService (QObject *parent=0)
| Basic constructor.
| ~AuthService ()
| Destructor.
void | queryMethods ()
| Requests the information on available authentication methods.
void | queryMechanisms (const QString &method)
| Requests the information on mechanisms which are available for certain authentication type.
void | queryIdentities (const IdentityFilter &filter=IdentityFilter())
| Requests information on identities which are stored.
void | clear ()
| Clears credentials database.

## Detailed Description

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.

## Member Typedef Documentation

## ◆ IdentityFilter

SignOn::AuthService::IdentityFilter

Map to hold different filtering options.

Definition at line 128 of file authservice.h.

## Member Enumeration Documentation

## ◆ IdentityFilterCriteria

enum SignOn::AuthService::IdentityFilterCriteria

Criterias for idetity query filtering.

See also
  AuthService::queryIdentities()

Definition at line 78 of file authservice.h.

## ◆ ServiceError

enum SignOn::AuthService::ServiceError

Codes for errors that may be reported by AuthService objects.

Deprecated
  This enum is deprecated. Replaced by Error::ErrorType.

Enumerator
UnknownError | Catch-all for errors not distinguished by another code.
InternalServerError | Signon Daemon internal error.
InternalCommunicationError | Communication with Signon Daemon error.
PermissionDeniedError | The operation cannot be performed due to insufficient client permissions.
MethodNotKnownError | The method with this name is not found.
NotAvailableError | The service is temporarily unavailable.
InvalidQueryError | Parameters for the query are invalid.

Definition at line 62 of file authservice.h.

## Constructor & Destructor Documentation

## ◆ AuthService()

SignOn::AuthService::AuthService | ( | QObject * | parent = 0 | ) |

Basic constructor.

Parameters

  parent | Parent object

Definition at line 29 of file authservice.cpp.

## ◆ ~AuthService()

SignOn::AuthService::~AuthService | ( |  | ) |

Destructor.

Definition at line 42 of file authservice.cpp.

## Member Function Documentation

## ◆ clear()

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.

See also
  AuthService::cleared()
  AuthService::error() @credential keychain-access key-chain application can clear database.

Definition at line 61 of file authservice.cpp.

## ◆ cleared

void SignOn::AuthService::cleared | ( |  | ) |
| signal

Database is cleared and reset to initial state.

This signal is emitted in response to clear().

## ◆ error

void SignOn::AuthService::error | ( | const SignOn::Error & | err | ) |
| 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

See also
  SignOn::Error
  SignOn::Error::ErrorType

Parameters

  err | The error object

## ◆ identities

void SignOn::AuthService::identities | ( | const QList< SignOn::IdentityInfo > & | identityList | ) |
| signal

Lists identities available on the server matching query parameters.

This signal is emitted in response to queryIdentities().

Parameters

  identityList | list of identities information

## ◆ mechanismsAvailable

void SignOn::AuthService::mechanismsAvailable | ( | const QString & | method,
|  | const QStringList & | mechanisms )
| signal

Emitted when the list of available mechanisms have been obtained from the service.

Parameters

  method | Name of authentication method that was queried
  mechanisms | List of available mechanisms

## ◆ methodsAvailable

void SignOn::AuthService::methodsAvailable | ( | const QStringList & | methods | ) |
| signal

Emitted when the list of available authentication methods have been obtained from the service.

Parameters

  methods | List of available authentication method names

## ◆ queryIdentities()

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.

See also
  AuthService::identities()
  AuthService::error()

Parameters

  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.

## ◆ queryMechanisms()

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.

See also
  AuthService::mechanismsAvailable()
  AuthService::error()

Parameters

  method | authetication method name

Definition at line 51 of file authservice.cpp.

## ◆ queryMethods()

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

See also
  AuthService::methodsAvailable()
  AuthService::error()

Definition at line 46 of file authservice.cpp.

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

- authservice.h
- authservice.cpp