QAbstractOAuth2

The QAbstractOAuth2 class is the base of all implementations of OAuth 2 authentication methods. More

Inheritance diagram of PySide6.QtNetworkAuth.QAbstractOAuth2

Inherited by: QOAuth2AuthorizationCodeFlow

Synopsis

Functions

Virtual functions

Signals

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

class PySide6.QtNetworkAuth.QAbstractOAuth2(manager[, parent=None])

PySide6.QtNetworkAuth.QAbstractOAuth2([parent=None])

Parameters

Constructs a QAbstractOAuth2 object using parent as parent and sets manager as the network access manager.

Constructs a QAbstractOAuth2 object using parent as parent.

PySide6.QtNetworkAuth.QAbstractOAuth2.authorizationCallbackReceived(data)
Parameters

data

PySide6.QtNetworkAuth.QAbstractOAuth2.clientIdentifierSharedKey()
Return type

str

This property holds the client shared key used as a password if the server requires authentication to request the token.

PySide6.QtNetworkAuth.QAbstractOAuth2.clientIdentifierSharedKeyChanged(clientIdentifierSharedKey)
Parameters

clientIdentifierSharedKey – str

PySide6.QtNetworkAuth.QAbstractOAuth2.createAuthenticatedUrl(url[, parameters=QVariantMap()])
Parameters
Return type

PySide6.QtCore.QUrl

The returned URL is based on url, combining it with the given parameters and the access token.

PySide6.QtNetworkAuth.QAbstractOAuth2.error(error, errorDescription, uri)
Parameters
PySide6.QtNetworkAuth.QAbstractOAuth2.expirationAt()
Return type

PySide6.QtCore.QDateTime

This property holds the expiration time of the current access token.

PySide6.QtNetworkAuth.QAbstractOAuth2.expirationAtChanged(expiration)
Parameters

expirationPySide6.QtCore.QDateTime

PySide6.QtNetworkAuth.QAbstractOAuth2.post(url, multiPart)
Parameters
Return type

PySide6.QtNetwork.QNetworkReply

PySide6.QtNetworkAuth.QAbstractOAuth2.post(url, data)
Parameters
Return type

PySide6.QtNetwork.QNetworkReply

PySide6.QtNetworkAuth.QAbstractOAuth2.put(url, data)
Parameters
Return type

PySide6.QtNetwork.QNetworkReply

PySide6.QtNetworkAuth.QAbstractOAuth2.put(url, multiPart)
Parameters
Return type

PySide6.QtNetwork.QNetworkReply

PySide6.QtNetworkAuth.QAbstractOAuth2.refreshToken()
Return type

str

PySide6.QtNetworkAuth.QAbstractOAuth2.refreshTokenChanged(refreshToken)
Parameters

refreshToken – str

PySide6.QtNetworkAuth.QAbstractOAuth2.responseType()
Return type

str

Returns the response_type used.

PySide6.QtNetworkAuth.QAbstractOAuth2.responseTypeChanged(responseType)
Parameters

responseType – str

PySide6.QtNetworkAuth.QAbstractOAuth2.scope()
Return type

str

This property holds This property holds the desired scope which defines the permissions requested by the client..

PySide6.QtNetworkAuth.QAbstractOAuth2.scopeChanged(scope)
Parameters

scope – str

PySide6.QtNetworkAuth.QAbstractOAuth2.setClientIdentifierSharedKey(clientIdentifierSharedKey)
Parameters

clientIdentifierSharedKey – str

This property holds the client shared key used as a password if the server requires authentication to request the token.

PySide6.QtNetworkAuth.QAbstractOAuth2.setRefreshToken(refreshToken)
Parameters

refreshToken – str

PySide6.QtNetworkAuth.QAbstractOAuth2.setResponseType(responseType)
Parameters

responseType – str

PySide6.QtNetworkAuth.QAbstractOAuth2.setScope(scope)
Parameters

scope – str

This property holds This property holds the desired scope which defines the permissions requested by the client..

PySide6.QtNetworkAuth.QAbstractOAuth2.setState(state)
Parameters

state – str

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.

PySide6.QtNetworkAuth.QAbstractOAuth2.setUserAgent(userAgent)
Parameters

userAgent – str

This property holds the User-Agent header used to create the network requests.

The default value is “QtOAuth/1.0 (+https://www.qt.io)”.

PySide6.QtNetworkAuth.QAbstractOAuth2.state()
Return type

str

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.

PySide6.QtNetworkAuth.QAbstractOAuth2.stateChanged(state)
Parameters

state – str

PySide6.QtNetworkAuth.QAbstractOAuth2.userAgent()
Return type

str

This property holds the User-Agent header used to create the network requests.

The default value is “QtOAuth/1.0 (+https://www.qt.io)”.

PySide6.QtNetworkAuth.QAbstractOAuth2.userAgentChanged(userAgent)
Parameters

userAgent – str