EnginioOAuth2Authentication Class
Represents a user that is authenticated directly by the backend using OAuth2 standard. More...
| Header: | #include <EnginioOAuth2Authentication> |
| Since: | Qt 5.3 |
| Inherits: | EnginioIdentity |
Properties
- 1 property inherited from QObject
Public Functions
| EnginioOAuth2Authentication(QObject * parent = 0) | |
| ~EnginioOAuth2Authentication() | |
| QString | password() const |
| QString | user() const |
- 31 public functions inherited from QObject
Public Slots
| void | setPassword(const QString & password) |
| void | setUser(const QString & user) |
- 1 public slot inherited from QObject
Signals
| void | passwordChanged(const QString & password) |
| void | userChanged(const QString & user) |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
Represents a user that is authenticated directly by the backend using OAuth2 standard.
This class can authenticate a user by verifying the user's login and password. The user has to exist in the backend already.
To authenticate an instance of EnginioClient called client such code may be used:
EnginioOAuth2Authentication *identity = new EnginioOAuth2Authentication(client); identity->setUser(_user); identity->setPassword(_password); client->setIdentity(identity);
Setting the identity will trigger an asynchronous request, resulting in EnginioClient::authenticationState() changing.
See also EnginioClientConnection::authenticationState(), EnginioClientConnection::identity(), EnginioClient::sessionAuthenticated(), EnginioClient::sessionAuthenticationError(), and EnginioClient::sessionTerminated().
Property Documentation
password : QString
This property contains the password used for authentication.
Access functions:
| QString | password() const |
| void | setPassword(const QString & password) |
Notifier signal:
| void | passwordChanged(const QString & password) |
user : QString
This property contains the user name used for authentication.
Access functions:
| QString | user() const |
| void | setUser(const QString & user) |
Notifier signal:
| void | userChanged(const QString & user) |