2 #include <QNetworkReply>
26 TOAuth2Client(
const QString &clientId,
const QString &clientSecret = QString());
30 QUrl startAuthorization(
const QUrl &requestUrl,
const QStringList &scopes,
const QString &state,
const QUrl &redirect,
const QVariantMap ¶meters = QVariantMap(),
int msecs = 5000);
31 QString requestAccessToken(
const QUrl &requestUrl,
const QString &code,
const QVariantMap ¶meters = QVariantMap(),
int msecs = 5000);
33 QNetworkReply::NetworkError
networkError()
const {
return _networkError; }
37 QString _clientSecret;
38 ErrorCode _errorCode {NoError};
39 QNetworkReply::NetworkError _networkError {QNetworkReply::NoError};
The TOAuth2Client class provides an implementation of the Authorization Code Grant flow in OAuth2 aut...
Definition: toauth2client.h:9
QNetworkReply::NetworkError networkError() const
Definition: toauth2client.h:33
TOAuth2Client(const TOAuth2Client &other)=default
TOAuth2Client & operator=(const TOAuth2Client &other)=default
ErrorCode errorCode()
Definition: toauth2client.h:32
ErrorCode
Definition: toauth2client.h:11
@ InvalidGrant
invalid grant
Definition: toauth2client.h:15
@ InvalidClient
invalid client
Definition: toauth2client.h:14
@ AccessDenied
access denied
Definition: toauth2client.h:18
@ UnsupportedGrantType
unsupported grant type
Definition: toauth2client.h:17
@ UnauthorizedClient
unauthorized client
Definition: toauth2client.h:16
@ InvalidRequest
invalid request
Definition: toauth2client.h:13
@ UnknownError
unknown error
Definition: toauth2client.h:23
@ ServerError
server error
Definition: toauth2client.h:21
@ TemporarilyUnavailable
temporarily unavailable
Definition: toauth2client.h:22
@ InvalidScope
invalid scope
Definition: toauth2client.h:20
@ UnsupportedResponseType
unsupported response type
Definition: toauth2client.h:19
#define T_CORE_EXPORT
Definition: tdeclexport.h:28