QAbstractOAuthReplyHandler#
Handles replies to OAuth authentication requests. More…
Inherited by: QOAuthOobReplyHandler, QOAuthHttpServerReplyHandler
Synopsis#
Virtual functions#
def
callback
()def
networkReplyFinished
(reply)
Signals#
def
callbackDataReceived
(data)def
callbackReceived
(values)def
replyDataReceived
(data)def
tokenRequestErrorOccurred
(error, errorString)def
tokensReceived
(tokens)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
The QAbstractOAuthReplyHandler
class handles the answers to all OAuth authentication requests. This class is designed as a base whose subclasses implement custom behavior in the callback()
and networkReplyFinished()
methods.
- class PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Constructs a reply handler as a child of parent
.
- abstract PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.callback()#
- Return type:
str
Returns an absolute URI that the server will redirect the resource owner back to when the Resource Owner Authorization step is completed. If the client is unable to receive callbacks or a callback URI has been established via other means, the parameter value must be set to “oob” (all lower-case), to indicate an out-of-band configuration.
Derived classes should implement this function to provide the expected callback type.
- PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.callbackDataReceived(data)#
- Parameters:
data –
PySide6.QtCore.QByteArray
This signal is emitted when a callback request is received: data
contains the information before parsing.
- PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.callbackReceived(values)#
- Parameters:
values – Dictionary with keys of type .QString and values of type QVariant.
This signal is emitted when the reply from the server is received, with values
containing the token credentials and any additional information the server may have returned. When this signal is emitted, the authorization process is complete.
- abstract PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.networkReplyFinished(reply)#
- Parameters:
reply –
PySide6.QtNetwork.QNetworkReply
After the server determines whether the request is valid this function will be called. Reimplement it to get the data received from the server wrapped in reply
. reply
will be automatically deleted using deleteLater(), it thus must not be stored beyond the scope of this function.
- PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.replyDataReceived(data)#
- Parameters:
data –
PySide6.QtCore.QByteArray
This signal is emitted when an HTTP request finishes and the data is available. data
contains the response before parsing.
- PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.tokenRequestErrorOccurred(error, errorString)#
- Parameters:
error –
Error
errorString – str
This signal is emitted when a token request or refresh error
has occurred. The errorString
may provide further details on the error.
See also
- PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler.tokensReceived(tokens)#
- Parameters:
tokens – Dictionary with keys of type .QString and values of type QVariant.
This signal is emitted when new tokens
are received from the server.