XX CMake Package
Loading...
Searching...
No Matches
XX::AuthProvider::OAuth Class Reference

OAuth2 authentication provider. More...

#include <XXAuthProviderOAuth.h>

Inheritance diagram for XX::AuthProvider::OAuth:
XX::AuthProvider::Token XX::Network::Settings

Detailed Description

OAuth2 authentication provider.

redirect url is http://127.0.0.1:1234/

Classes

class  BlockState

Public Member Functions

 OAuth (QObject *parent)
void setTokenInfoUrl (const QString url)
QJsonObject getTokenInfo (QByteArray token=QByteArray()) const
void setStandardFlow (const QString &baseAuthUrl, const QString &clientId, const QString &clientSecret)
void setCustomFlow (QOAuth2AuthorizationCodeFlow *oauthFlow)
void setFinalRedirect (const QString &url)
void setFinalHTML (const QString &html)
QOAuth2AuthorizationCodeFlow * getFlow () const
Public Member Functions inherited from XX::AuthProvider::Token
 Token (QObject *parent)
const QByteArray & getBearerToken () const
bool isNull () const
void setBearerToken (const QByteArray &token)
virtual void setAuthorization (QNetworkRequest &request) const
Public Member Functions inherited from XX::Network::Settings
 Settings ()
void setVerbose (bool enabled)
bool verbose () const

Protected Types

enum class  State {
  Initial , AuthUser , Update , Blocked ,
  Ready
}

Protected Member Functions

virtual bool update () override
virtual bool authorizeUser ()
virtual void saveRefreshToken (const QString &refreshToken)
virtual QString loadRefreshToken ()

Additional Inherited Members

Static Public Member Functions inherited from XX::Network::Settings
static void setUseExceptions (bool enabled)
static bool useExceptions ()
Protected Attributes inherited from XX::AuthProvider::Token
QByteArray bearerToken

Member Enumeration Documentation

◆ State

enum class XX::AuthProvider::OAuth::State
strongprotected
Enumerator
Initial 
AuthUser 
Update 
Blocked 
Ready 

Constructor & Destructor Documentation

◆ OAuth()

XX::AuthProvider::OAuth::OAuth ( QObject * parent)

Member Function Documentation

◆ authorizeUser()

virtual bool XX::AuthProvider::OAuth::authorizeUser ( )
protectedvirtual

◆ getFlow()

QOAuth2AuthorizationCodeFlow * XX::AuthProvider::OAuth::getFlow ( ) const

◆ getTokenInfo()

QJsonObject XX::AuthProvider::OAuth::getTokenInfo ( QByteArray token = QByteArray()) const

◆ loadRefreshToken()

virtual QString XX::AuthProvider::OAuth::loadRefreshToken ( )
protectedvirtual

◆ saveRefreshToken()

virtual void XX::AuthProvider::OAuth::saveRefreshToken ( const QString & refreshToken)
protectedvirtual

◆ setCustomFlow()

void XX::AuthProvider::OAuth::setCustomFlow ( QOAuth2AuthorizationCodeFlow * oauthFlow)

◆ setFinalHTML()

void XX::AuthProvider::OAuth::setFinalHTML ( const QString & html)

◆ setFinalRedirect()

void XX::AuthProvider::OAuth::setFinalRedirect ( const QString & url)

◆ setStandardFlow()

void XX::AuthProvider::OAuth::setStandardFlow ( const QString & baseAuthUrl,
const QString & clientId,
const QString & clientSecret )

◆ setTokenInfoUrl()

void XX::AuthProvider::OAuth::setTokenInfoUrl ( const QString url)

◆ update()

virtual bool XX::AuthProvider::OAuth::update ( )
overrideprotectedvirtual

Reimplemented from XX::AuthProvider::Token.


The documentation for this class was generated from the following file: