added logout spec

This commit is contained in:
dorian 2019-08-08 14:44:06 +02:00
parent eb8edc8d03
commit 34d9e27de5
1 changed files with 18 additions and 2 deletions

View File

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