summaryrefslogtreecommitdiff
path: root/src/enginio_plugin/enginioplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/enginio_plugin/enginioplugin.cpp')
-rw-r--r--src/enginio_plugin/enginioplugin.cpp57
1 files changed, 50 insertions, 7 deletions
diff --git a/src/enginio_plugin/enginioplugin.cpp b/src/enginio_plugin/enginioplugin.cpp
index 4d98e8f..1fd2b7f 100644
--- a/src/enginio_plugin/enginioplugin.cpp
+++ b/src/enginio_plugin/enginioplugin.cpp
@@ -48,11 +48,11 @@
QT_BEGIN_NAMESPACE
/*!
- * \qmlmodule Enginio 1.0
- * \title Enginio QML Plugin
- *
- * The Enginio QML plugin provides access to the Enginio service through a set of
- * QML types.
+ \qmlmodule Enginio 1.0
+ \title Enginio QML Plugin
+
+ The Enginio QML plugin provides access to the Enginio service through a set of
+ QML types.
*/
class EnginioNetworkAccessManagerFactory: public QQmlNetworkAccessManagerFactory
@@ -77,11 +77,54 @@ void EnginioPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
engine->setNetworkAccessManagerFactory(&factory);
} else {
qWarning() << "Enginio client failed to install QQmlNetworkAccessManagerFactory"
- "on QML engine because a differnt factory is already attached, It"
- " is recomanded to use QNetworkAccessManager delivered by Enginio";
+ "on QML engine because a different factory is already attached, it"
+ " is recommended to use QNetworkAccessManager delivered by Enginio";
}
}
+/*!
+ \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 string EnginioOAuth2Authentication::user
+ This property contains the user name used for authentication.
+*/
+
+/*!
+ \qmlproperty string EnginioOAuth2Authentication::password
+ This property contains the password used for authentication.
+*/
+
+
void EnginioPlugin::registerTypes(const char *uri)
{
// @uri Enginio