summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@digia.com>2014-09-26 12:15:18 +0200
committerJędrzej Nowacki <jedrzej.nowacki@digia.com>2014-09-26 12:54:08 +0200
commit2b93eb45116e0bf2cc62f614de66cfd261c552df (patch)
tree25c078d315ad1dad388d8625bf71c2effa535194
parentf4b5b2c472a7e4df053919877130924b6615b44b (diff)
downloadqtenginio-2b93eb45116e0bf2cc62f614de66cfd261c552df.tar.gz
Add QML documentation for OAuth2 identification
Task-number: QTBUG-41493 Change-Id: Ic6b768a21e294dddda730cf34145912aabcf30db Reviewed-by: Martin Smith <martin.smith@digia.com>
-rw-r--r--src/enginio_plugin/enginioplugin.cpp53
1 files changed, 43 insertions, 10 deletions
diff --git a/src/enginio_plugin/enginioplugin.cpp b/src/enginio_plugin/enginioplugin.cpp
index db737f2..7e2305d 100644
--- a/src/enginio_plugin/enginioplugin.cpp
+++ b/src/enginio_plugin/enginioplugin.cpp
@@ -82,6 +82,49 @@ void EnginioPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
}
}
+/*!
+ \qmltype EnginioOAuth2Authentication
+ \since 5.3
+ \instantiates EnginioOAuth2Authentication
+ \inqmlmodule Enginio
+ \ingroup engino-qml
+ \target EnginioOAuth2AuthenticationQml
+ \brief Represents a user that is authenticated directly by the backend using OAuth2 standard.
+
+ This component can authenticate a user by verifying the user's login and password.
+ The user has to exist in the backend already.
+
+ To authenticate an instance of EnginioClient called \a client such code may be used:
+ \code
+ EnginioClient {
+ ...
+ identity: oauth2
+ }
+ EnginioOAuth2Authentication {
+ id: oauth2
+ user: "userName"
+ password: "userPassword"
+ }
+ \endcode
+
+ Setting the identity on the EnginioClient will trigger an asynchronous request, resulting in
+ EnginioClient::authenticationState changing.
+
+ \sa EnginioClient::authenticationState EnginioClient::identity EnginioClient::sessionAuthenticated
+ \sa EnginioClient::sessionAuthenticationError() EnginioClient::sessionTerminated()
+*/
+
+/*!
+ \qmlproperty EnginioOAuth2Authentication::user
+ This property contains the user name used for authentication.
+*/
+
+/*!
+ \qmlproperty EnginioOAuth2Authentication::password
+ This property contains the password used for authentication.
+*/
+
+
void EnginioPlugin::registerTypes(const char *uri)
{
// @uri Enginio
@@ -97,14 +140,4 @@ void EnginioPlugin::registerTypes(const char *uri)
qmlRegisterUncreatableType<QNetworkReply>(uri, 1, 0, "QNetworkReply", "QNetworkReply is abstract and it can not be constructed");
}
-/*!
- \qmltype EnginioOAuth2Authentication
- \since 5.3
- \instantiates EnginioOAuth2Authentication
- \inqmlmodule Enginio
- \ingroup engino-qml
- \target EnginioOAuth2AuthenticationQml
-
-*/
-
QT_END_NAMESPACE