QOAuth2AuthorizationCodeFlow¶
The QOAuth2AuthorizationCodeFlow
class provides an implementation of the Authorization Code Grant flow. More…
Synopsis¶
Functions¶
def
accessTokenUrl
()def
buildAuthenticateUrl
([parameters={}])def
requestAccessToken
(code)def
setAccessTokenUrl
(accessTokenUrl)
Slots¶
def
refreshAccessToken
()
Signals¶
def
accessTokenUrlChanged
(accessTokenUrl)
Detailed Description¶
This class implements the Authorization Code Grant flow, which is used both to obtain and to refresh access tokens. It is a redirection-based flow so the user will need access to a web browser.
- class PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow(manager[, parent=None])¶
PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow([parent=None])
PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow(clientIdentifier, manager[, parent=None])
PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow(clientIdentifier, authorizationUrl, accessTokenUrl, manager[, parent=None])
PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow(authorizationUrl, accessTokenUrl, manager[, parent=None])
- Parameters
authorizationUrl –
PySide6.QtCore.QUrl
clientIdentifier – str
accessTokenUrl –
PySide6.QtCore.QUrl
manager –
PySide6.QtNetwork.QNetworkAccessManager
parent –
PySide6.QtCore.QObject
Constructs a QOAuth2AuthorizationCodeFlow
object using parent
as parent and sets manager
as the network access manager.
Constructs a QOAuth2AuthorizationCodeFlow
object with parent object parent
.
Constructs a QOAuth2AuthorizationCodeFlow
object using parent
as parent and sets manager
as the network access manager. The client identifier is set to clientIdentifier
.
Constructs a QOAuth2AuthorizationCodeFlow
object using parent
as parent and sets manager
as the network access manager. The client identifier is set to clientIdentifier
the authenticate URL is set to authenticateUrl
and the access token URL is set to accessTokenUrl
.
Constructs a QOAuth2AuthorizationCodeFlow
object using parent
as parent and sets manager
as the network access manager. The authenticate URL is set to authenticateUrl
and the access token URL is set to accessTokenUrl
.
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.accessTokenUrl()¶
- Return type
This property holds This property holds the URL used to convert the temporary code received during the authorization response..
See also: Access Token Request
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.accessTokenUrlChanged(accessTokenUrl)¶
- Parameters
accessTokenUrl –
PySide6.QtCore.QUrl
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.buildAuthenticateUrl([parameters={}])¶
- Parameters
parameters –
- Return type
Generates an authentication URL to be used in the Authorization Request using parameters
.
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.refreshAccessToken()¶
Call this function to refresh the token. Access tokens are not permanent. After a time specified along with the access token when it was obtained, the access token will become invalid.
See also: Refresh Token
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.requestAccessToken(code)¶
- Parameters
code – str
Requests an access token from the received code
. The code
is received as a response when the user completes a successful authentication in the browser.
- PySide6.QtNetworkAuth.QOAuth2AuthorizationCodeFlow.setAccessTokenUrl(accessTokenUrl)¶
- Parameters
accessTokenUrl –
PySide6.QtCore.QUrl
This property holds This property holds the URL used to convert the temporary code received during the authorization response..
See also: Access Token Request
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.