Update docs
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
+ username: babar (string)
|
||||
+ password: tortue (string)
|
||||
|
||||
## Token (object)
|
||||
+ token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c (string)
|
||||
|
||||
## InvalidCredentials (object)
|
||||
+ description: Invalid credentials (string),
|
||||
@@ -14,7 +12,7 @@
|
||||
|
||||
# Group Accounts
|
||||
|
||||
## Create an account [/user]
|
||||
## Account [/user]
|
||||
|
||||
### Register a new user [POST]
|
||||
|
||||
@@ -31,9 +29,17 @@
|
||||
+ Response 409 (application/json)
|
||||
+ Attributes (object)
|
||||
+ message: User already exists (string)
|
||||
|
||||
### Delete a user [DELETE]
|
||||
|
||||
+ Request
|
||||
+ Headers
|
||||
Authorization: Bearer <token>
|
||||
|
||||
+ Response 200 (application/json)
|
||||
|
||||
|
||||
## Authenticate user [/user/login]
|
||||
## Authentication [/user/login]
|
||||
Authenticate one user to access protected routing.
|
||||
|
||||
### Authenticate a user [POST]
|
||||
@@ -42,23 +48,41 @@ Authenticate one user to access protected routing.
|
||||
+ Attributes (Login)
|
||||
|
||||
+ Response 200 (application/json)
|
||||
+ Attributes (Token)
|
||||
+ Attributes
|
||||
+ token: <token>
|
||||
+ refreshToken: `<refresh-token>`
|
||||
|
||||
+ Response 401 (application/json)
|
||||
+ Attributes (InvalidCredentials)
|
||||
|
||||
## Token refresh [/user/refresh_token]
|
||||
|
||||
### Refresh JWT token [POST]
|
||||
|
||||
+ Request (application/json)
|
||||
+ Attributes
|
||||
+ refreshToken: `<refresh-token>`
|
||||
|
||||
+ Response 200 (application/json)
|
||||
+ Attributes
|
||||
+ token: <token>
|
||||
+ refreshToken: `<refresh-token>`
|
||||
|
||||
+ Response 401 (application/json)
|
||||
+ Attributes (InvalidCredentials)
|
||||
|
||||
## Get User Info [/user/me]
|
||||
## User Info [/user/me]
|
||||
Receive the username and email from the currently logged in user
|
||||
|
||||
### Get User Info [GET]
|
||||
|
||||
+ Request (application/json)
|
||||
+ Headers
|
||||
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
Authorization: Bearer <token>
|
||||
|
||||
|
||||
+ Response 200 (application/json)
|
||||
+ Attributes
|
||||
+ user: (object)
|
||||
+ username: Jean (string)
|
||||
+ email: abc@def.ghi
|
||||
+ username: babar (string)
|
||||
+ email: `michel@seed-it.eu` (string)
|
||||
Reference in New Issue
Block a user