W3cubDocs

/Qt 5.11

QAbstractOAuthReplyHandler Class

Handles replies to OAuth authentication requests. More...

Header: #include <QAbstractOAuthReplyHandler>
qmake: QT += networkauth
Since: Qt 5.8
Inherits: QObject

Public Functions

QAbstractOAuthReplyHandler(QObject *parent = nullptr)
virtual ~QAbstractOAuthReplyHandler()
virtual QString callback() const = 0
  • 34 public functions inherited from QObject

Public Slots

virtual void networkReplyFinished(QNetworkReply *reply) = 0
  • 1 public slot inherited from QObject

Signals

void callbackDataReceived(const QByteArray &data)
void callbackReceived(const QVariantMap &values)
void replyDataReceived(const QByteArray &data)
void tokensReceived(const QVariantMap &tokens)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Handles replies to OAuth authentication requests

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.

Member Function Documentation

QAbstractOAuthReplyHandler::QAbstractOAuthReplyHandler(QObject *parent = nullptr)

Constructs a reply handler as a child of parent.

[virtual] QAbstractOAuthReplyHandler::~QAbstractOAuthReplyHandler()

Destroys the reply handler.

[pure virtual] QString QAbstractOAuthReplyHandler::callback() const

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.

[signal] void QAbstractOAuthReplyHandler::callbackDataReceived(const QByteArray &data)

This signal is emitted when a callback request is received: data contains the information before parsing.

[signal] void QAbstractOAuthReplyHandler::callbackReceived(const QVariantMap &values)

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.

[pure virtual slot] void QAbstractOAuthReplyHandler::networkReplyFinished(QNetworkReply *reply)

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.

[signal] void QAbstractOAuthReplyHandler::replyDataReceived(const QByteArray &data)

This signal is emitted when an HTTP request finishes and the data is available. data contains the response before parsing.

[signal] void QAbstractOAuthReplyHandler::tokensReceived(const QVariantMap &tokens)

This signal is emitted when new tokens are received from the server.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5/qabstractoauthreplyhandler.html