#include <toauth2client.h>
|
enum | ErrorCode {
NoError = 0
, InvalidRequest
, InvalidClient
, InvalidGrant
,
UnauthorizedClient
, UnsupportedGrantType
, AccessDenied
, UnsupportedResponseType
,
InvalidScope
, ServerError
, TemporarilyUnavailable
, UnknownError
} |
|
The TOAuth2Client class provides an implementation of the Authorization Code Grant flow in OAuth2 authentication methods.
- See also
- https://tools.ietf.org/html/rfc6749
◆ ErrorCode
Enumerator |
---|
NoError | no error
|
InvalidRequest | invalid request
|
InvalidClient | invalid client
|
InvalidGrant | invalid grant
|
UnauthorizedClient | unauthorized client
|
UnsupportedGrantType | unsupported grant type
|
AccessDenied | access denied
|
UnsupportedResponseType | unsupported response type
|
InvalidScope | invalid scope
|
ServerError | server error
|
TemporarilyUnavailable | temporarily unavailable
|
UnknownError | unknown error
|
◆ TOAuth2Client() [1/2]
TOAuth2Client::TOAuth2Client |
( |
const QString & |
clientId, |
|
|
const QString & |
clientSecret = QString() |
|
) |
| |
◆ TOAuth2Client() [2/2]
◆ errorCode()
◆ networkError()
QNetworkReply::NetworkError TOAuth2Client::networkError |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ requestAccessToken()
QString TOAuth2Client::requestAccessToken |
( |
const QUrl & |
requestUrl, |
|
|
const QString & |
code, |
|
|
const QVariantMap & |
parameters = QVariantMap() , |
|
|
int |
msecs = 5000 |
|
) |
| |
Requests an access token from the authorization server's token endpoint of requestUrl by including the authorization code received.
◆ startAuthorization()
QUrl TOAuth2Client::startAuthorization |
( |
const QUrl & |
requestUrl, |
|
|
const QStringList & |
scopes, |
|
|
const QString & |
state, |
|
|
const QUrl & |
redirect, |
|
|
const QVariantMap & |
parameters = QVariantMap() , |
|
|
int |
msecs = 5000 |
|
) |
| |
Initiates the flow by directing the resource owner's user-agent to the authorization endpoint of requestUrl and returns a QURL object to redirect the user-agent.
The documentation for this class was generated from the following files: