summaryrefslogtreecommitdiffstats
path: root/doc/afb-application-writing.md
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-30 14:50:15 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-30 14:50:15 +0200
commitea682aac623181e6df8555c29cca52697460c22f (patch)
tree7445b5fed27537b27e6f13ad0ae0ab6db9ed8ce6 /doc/afb-application-writing.md
parente1f0baa400cd40c5cded98328e9353b9d433b94f (diff)
remove the document afb-daemon.{md,html}
Change-Id: I6877be36cbc4e4125d7cdf658807aee98de4c82a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'doc/afb-application-writing.md')
-rw-r--r--doc/afb-application-writing.md34
1 files changed, 24 insertions, 10 deletions
diff --git a/doc/afb-application-writing.md b/doc/afb-application-writing.md
index 7d2cd635..ead31a91 100644
--- a/doc/afb-application-writing.md
+++ b/doc/afb-application-writing.md
@@ -6,8 +6,10 @@ HOWTO WRITE an APPLICATION above AGL FRAMEWORK
TABLE-OF-CONTENT-HERE
-Writing an HTML5 application
-----------------------------
+Languages for writing Applications
+----------------------------------
+
+### Writing an HTML5 application
Developpers of HTML5 applications (client side) can easyly create
applications for AGL framework using their prefered
@@ -26,8 +28,7 @@ Two examples of HTML5 applications are given:
- [afm-client](https://github.com/iotbzh/afm-client) a simple "Home screen" application
-Writing a Qt application
-------------------------
+### Writing a Qt application
Writing Qt applications is also possible because Qt offers APIs to
make HTTP queries and to connect using WebSockets.
@@ -38,8 +39,7 @@ It is demontrated by the sample application token-websock:
- [token-websock](https://github.com/iotbzh/afb-daemon/blob/master/test/token-websock.qml)
a simple "hello world" application in QML
-Writing a C application
------------------------
+### Writing a C application
C applications can use the binder afb-daemon through a websocket connection.
@@ -58,7 +58,8 @@ and being less dependant of libsystemd.
Handling sessions within applications
-------------------------------------
-### Exchanging tokens
+Applications must be aware of the the features session and token
+when they interact with the binder afb-daemon.
Applications are communicating with their binder afb-daemon using
a network connection or a kind of network connection (unix domain
@@ -67,11 +68,24 @@ Also, HTTP protocol is not a connected protocol. It means that
the socket connection can not be used to authenticate a client.
For this reason, the binder should authenticate the application
-by using a commonly shared secret named token.
+by using a commonly shared secret named token and the identification
+of the client named session.
+
+### Handling sessions
+
+Plugins and features of the binder need to keep track of the client
+instances. In principle, a binder afb-daemon is launched by application
+instance. But for services, a binder
+
+### Exchanging tokens
At start, the framework communicate a common secret to both the binder
-and its client: the application. When the application
+and its client: the application. This initial secret is the
+initial token.
+
+For each of its client application, the binder manages a current active
+token. The initial token is the default active token. It is the expected
+token for new clients.
-### Handling sessions