added logout spec

This commit is contained in:
dorian 2019-08-08 14:44:06 +02:00
parent eb8edc8d03
commit 34d9e27de5

View file

@ -134,7 +134,7 @@ triggered by setting POST parameter 'submitSensorData' to a JSON encoded string
- reply structure: (JSON object) - reply structure: (JSON object)
- header: (int) indicating if the request was successfull (mostly like HTTP status codes) - header: (int) indicating if the request was successfull (mostly like HTTP status codes)
- body: (mixed)(optional) containing further data depending on the request - body: (mixed)(optional) containing further data depending on the request
---
### login ### login
submit username and password to get a session token which can be used to authenticate any further commands submit username and password to get a session token which can be used to authenticate any further commands
#### Request #### Request
@ -147,8 +147,22 @@ submit username and password to get a session token which can be used to authent
- 200: OK - 200: OK
- 400: invalid request - 400: invalid request
- 401: invalid username or password - 401: invalid username or password
- body: (string) (only set when header is 200) Session-token - body: (string) (only set when header is 200) session-token
---
### logout
submit session token to destroy the session
#### Request
- header: 1002
- body: (string) session-token
#### Reply
- header: (int)
- 200: OK
- 400: invalid request
- 401: invalid session-token
#### Reply
- header: (int)
---
### get user information ### get user information
submit a sesion token to check if it s valid and get some information about the user if it is submit a sesion token to check if it s valid and get some information about the user if it is
#### Request #### Request
@ -162,3 +176,5 @@ submit a sesion token to check if it s valid and get some information about the
- body: (object) (only set when header is 200) - body: (object) (only set when header is 200)
- username: (string) username of the user the session belongs to - username: (string) username of the user the session belongs to
- realname: (string) full name of the user the session belongs to - realname: (string) full name of the user the session belongs to