summaryrefslogtreecommitdiffstats
path: root/src/oauth/qabstractoauth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/oauth/qabstractoauth.cpp')
-rw-r--r--src/oauth/qabstractoauth.cpp75
1 files changed, 66 insertions, 9 deletions
diff --git a/src/oauth/qabstractoauth.cpp b/src/oauth/qabstractoauth.cpp
index 0f34fa2..9a53b46 100644
--- a/src/oauth/qabstractoauth.cpp
+++ b/src/oauth/qabstractoauth.cpp
@@ -152,25 +152,82 @@ QT_BEGIN_NAMESPACE
/*!
\property QAbstractOAuth::authorizationUrl
\brief This property holds the URL used to request the Resource
- Owner Authorization.
-
- \b {See also} \l {https://tools.ietf.org/html/rfc5849#section-2.2}
- {The OAuth 1.0 Protocol: Resource Owner Authorization}.
+ Owner Authorization as described in:
+ \l{https://tools.ietf.org/html/rfc5849#section-2.2}{The OAuth
+ 1.0 Protocol: Resource Owner Authorization}
*/
/*!
- \fn void QAbstractOAuth::authorizeWithBrowser(const QUrl &url)
- This signal is emitted when the URL \a url, generated by
- resourceOwnerAuthorization(), is ready to be used in the web
+ \fn void authorizeWithBrowser(const QUrl &url)
+
+ This signal is emitted when the URL generated by
+ \a resourceOwnerAuthorization is ready to be used in the web
browser to allow the application to impersonate the user.
*/
/*!
- \fn void QAbstractOAuth::granted()
+ \fn void granted()
+
This signal is emitted when the authorization flow finishes
successfully.
*/
+/*!
+ \fn QNetworkReply *head(const QUrl &url, const QVariantMap &parameters)
+
+ Posts an authenticated HEAD request and returns a new
+ QNetworkReply. The \a url and \a parameters are used to create
+ the request.
+
+ \b {See also}: \l {https://tools.ietf.org/html/rfc2616#section-9.4}
+ {Hypertext Transfer Protocol -- HTTP/1.1: HEAD}
+*/
+
+/*!
+ \fn QNetworkReply *get(const QUrl &url, const QVariantMap &parameters)
+
+ Posts an authenticated GET request and returns a new
+ QNetworkReply. The \a url and \a parameters are used to create
+ the request.
+
+ \b {See also}: \l {https://tools.ietf.org/html/rfc2616#section-9.3}
+ {Hypertext Transfer Protocol -- HTTP/1.1: GET}
+*/
+
+/*!
+ \fn QNetworkReply *post(const QUrl &url, const QVariantMap &parameters)
+
+ Posts an authenticated POST request and returns a new
+ QNetworkReply. The \a url and \a parameters are used to create
+ the request.
+
+ \b {See also}: \l {https://tools.ietf.org/html/rfc2616#section-9.5}
+ {Hypertext Transfer Protocol -- HTTP/1.1: POST}
+*/
+
+/*!
+ \fn QNetworkReply *deleteResource(const QUrl &url, const QVariantMap &parameters)
+
+ Posts an authenticated DELETE request and returns a new
+ QNetworkReply. The \a url and \a parameters are used to create
+ the request.
+
+ \b {See also}: \l {https://tools.ietf.org/html/rfc2616#section-9.7}
+ {Hypertext Transfer Protocol -- HTTP/1.1: DELETE}
+*/
+
+/*!
+ \fn void grant()
+
+ Override this function to implement the corresponding
+ authentication flow in the subclasses. Client code calls this
+ function to start the authentication workflow. This may require
+ user interaction: for example, asking the user's authorization
+ via a web browser. When the authentication succeeds, it should
+ emit granted(); this gives notice that credentials are ready to
+ be used in authenticated calls.
+*/
+
QAbstractOAuthPrivate::QAbstractOAuthPrivate(QNetworkAccessManager *manager) :
QAbstractOAuthPrivate(QUrl(), manager)
{}
@@ -408,7 +465,7 @@ void QAbstractOAuth::resourceOwnerAuthorization(const QUrl &url, const QVariantM
The parameter \a length determines the size of the generated
string.
- \b {See also} \l {https://tools.ietf.org/html/rfc5849#section-3.3}{The
+ \b {See also}: \l {https://tools.ietf.org/html/rfc5849#section-3.3}{The
OAuth 1.0 Protocol: Nonce and Timestamp}.
*/
QByteArray QAbstractOAuth::generateRandomString(quint8 length)