diff options
Diffstat (limited to 'src/oauth/qabstractoauth.cpp')
-rw-r--r-- | src/oauth/qabstractoauth.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/oauth/qabstractoauth.cpp b/src/oauth/qabstractoauth.cpp index 5326292..a7a6c29 100644 --- a/src/oauth/qabstractoauth.cpp +++ b/src/oauth/qabstractoauth.cpp @@ -44,6 +44,7 @@ #include <QtNetwork/qnetworkrequest.h> #include <QtNetwork/qnetworkaccessmanager.h> +#include <QtNetwork/qnetworkreply.h> #include <random> @@ -91,7 +92,7 @@ QT_BEGIN_NAMESPACE \enum QAbstractOAuth::Stage Identifies an authentication stage. It's passed to a - ModifyParametersFunction so that it can make different changes to + modifyParametersFunction so that it can make different changes to parameters at each call to it during the process of authentication. @@ -510,8 +511,25 @@ void QAbstractOAuth::setReplyHandler(QAbstractOAuthReplyHandler *handler) } /*! + \since 5.13 + + Authorizes the given \a request by adding a header and \a body to + it required for authenticated requests. + + The \a verb must be a valid HTTP verb and the same as the one that will be + used to send the \a request. +*/ +void QAbstractOAuth::prepareRequest(QNetworkRequest *request, + const QByteArray &verb, + const QByteArray &body) +{ + Q_D(QAbstractOAuth); + d->prepareRequestImpl(request, verb, body); +} + +/*! Returns the current parameter-modification function. - \sa ModifyParametersFunction, setModifyParametersFunction(), Stage + \sa QAbstractOAuth::ModifyParametersFunction, setModifyParametersFunction(), Stage */ QAbstractOAuth::ModifyParametersFunction QAbstractOAuth::modifyParametersFunction() const { @@ -524,7 +542,7 @@ QAbstractOAuth::ModifyParametersFunction QAbstractOAuth::modifyParametersFunctio This function is used to customize the parameters sent to the server during a specified authorization stage. The number of calls to this function depends on the flow used during the authentication. - \sa modifyParametersFunction(), ModifyParametersFunction, Stage + \sa modifyParametersFunction(), Stage */ void QAbstractOAuth::setModifyParametersFunction( const QAbstractOAuth::ModifyParametersFunction &modifyParametersFunction) |