QAbstractOAuth2 Class
The QAbstractOAuth2 class is the base of all implementations of OAuth 2 authentication methods. More...
| Header: | #include <QAbstractOAuth2> |
| qmake: | QT += networkauth |
| Since: | Qt 5.8 |
| Inherits: | QAbstractOAuth |
| Inherited By: |
This class was introduced in Qt 5.8.
Properties
|
Public Functions
| QString | clientIdentifierSharedKey() const |
| QDateTime | expirationAt() const |
| QString | refreshToken() const |
| QString | scope() const |
| void | setClientIdentifierSharedKey(const QString &clientIdentifierSharedKey) |
| void | setRefreshToken(const QString &refreshToken) |
| void | setScope(const QString &scope) |
| void | setState(const QString &state) |
| void | setUserAgent(const QString &userAgent) |
| QString | state() const |
| QString | userAgent() const |
Signals
| void | clientIdentifierSharedKeyChanged(const QString &clientIdentifierSharedKey) |
| void | expirationAtChanged(const QDateTime &expiration) |
| void | refreshTokenChanged(const QString &refreshToken) |
| void | scopeChanged(const QString &scope) |
| void | stateChanged(const QString &state) |
| void | userAgentChanged(const QString &userAgent) |
Detailed Description
The class defines the basic interface of the OAuth 2 authentication classes. By inheriting this class, you can create custom authentication methods using the OAuth 2 standard for different web services.
A description of how OAuth 2 works can be found in: The OAuth 2.0 Authorization Framework
Property Documentation
clientIdentifierSharedKey : QString
This property holds the client shared key used as a password if the server requires authentication to request the token.
Access functions:
| QString | clientIdentifierSharedKey() const |
| void | setClientIdentifierSharedKey(const QString &clientIdentifierSharedKey) |
Notifier signal:
| void | clientIdentifierSharedKeyChanged(const QString &clientIdentifierSharedKey) |
expiration : const QDateTime
This property holds the expiration time of the current access token.
Access functions:
| QDateTime | expirationAt() const |
Notifier signal:
| void | expirationAtChanged(const QDateTime &expiration) |
scope : QString
This property holds the desired scope which defines the permissions requested by the client.
Access functions:
| QString | scope() const |
| void | setScope(const QString &scope) |
Notifier signal:
| void | scopeChanged(const QString &scope) |
state : QString
This property holds the string sent to the server during authentication. The state is used to identify and validate the request when the callback is received.
Access functions:
| QString | state() const |
| void | setState(const QString &state) |
Notifier signal:
| void | stateChanged(const QString &state) |
userAgent : QString
This property holds the User-Agent header used to create the network requests.
The default value is "QtOAuth/1.0 (+https://www.qt.io)".
Access functions:
| QString | userAgent() const |
| void | setUserAgent(const QString &userAgent) |
Notifier signal:
| void | userAgentChanged(const QString &userAgent) |