opt-cc/server/apib/data_structures/_auth.apib

30 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

# Login (object)
User related entity for creating a token using application credentials
## Properties
+ username: `testuser` (string, required) - username of the app-user
+ password: `password` (string, required) - password of the app-user
# LoginResponse (object)
Response object on successful token creation
## Properties
+ _id: `593d632772d35225232bcabb` (string, required) - the unique id of the app-user
2018-03-19 20:32:59 +01:00
+ username: `kallek` (string, required) - the username of the app-user
2018-04-01 15:12:24 +02:00
+ permission: 3 (number, required)- the permission level of the app-user (0 - user, 1 - sql, 2 - hl, 3 - maintainer, 4 - admin)
+ squad (Squad, required) - squad the app-user is member of
2018-04-01 15:12:24 +02:00
+ token: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1OTNkNWUzZjcyZDM1MjI1MjIyYmNhYmEiLCJpYXQiOjE1MjEzOTQ5NDYsImV4cCI6MTUyMzgxNDE0Nn0.vOAwA5--qrx8BglhyGZWVYx7LeuRKOHH0NQXmHFNhIQ` (string,required) - generated access token
+ tokenExpireDate: `2018-04-15T17:42:25.050Z` (string,required) - expiration date of the token
# Registration (object)
User related entity for reflecting membership to another resource (groups, material databases)
## Properties
2018-03-19 20:32:59 +01:00
+ username: `kallek` (string, required) - the username of the app-user
+ password: `password` (string, required) - password of the app-user
+ secret: `random secret text` (string, required) - secret used for sign-up identification in connection with board usage