EnginioOAuth2Authentication Class

Represents a user that is authenticated directly by the backend using OAuth2 standard. More...

Header: #include <EnginioOAuth2Authentication>
Since: Qt 5.3
Instantiated By: EnginioOAuth2Authentication
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)

Additional Inherited Members

  • 11 static public members inherited from QObject
  • 9 protected functions 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)

Member Function Documentation

EnginioOAuth2Authentication::​EnginioOAuth2Authentication(QObject * parent = 0)

Constructs a EnginioPasswordOAuth2 instance with parent as QObject parent.

EnginioOAuth2Authentication::​~EnginioOAuth2Authentication()

Destructs this EnginioPasswordOAuth2 instance.

© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.