Remove nuxt + 100 other things..

This commit is contained in:
2020-07-08 19:46:04 +02:00
parent 3b80ae051d
commit 44b463d9d5
132 changed files with 6202 additions and 10961 deletions
+72 -47
View File
@@ -1,41 +1,37 @@
# Data Structures
## Login (object)
+ username: babar (string)
+ password: tortue (string)
## InvalidCredentials (object)
+ description: Invalid credentials (string),
+ error: Bad Request (string),
+ status_code: 401 (number)
# Group Accounts
## Account [/user]
### Register a new user [POST]
### Create an account [POST]
+ Request (application/json)
+ Attributes (object)
+ username: babar (string)
+ password: tortue (string)
+ Response 200 (application/json)
+ Attributes (object)
+ message: Created (string)
+ Headers
Accept: application/json
+ Body
{
"username": "user",
"password": "apassword"
}
+ Response 200
+ Response 409
+ Response 409 (application/json)
+ Attributes (object)
+ message: User already exists (string)
### Delete a user [DELETE]
+ Request
+ Headers
Authorization: Bearer <token>
+ Response 200 (application/json)
Authorization: Bearer <token>
Accept: application/json
+ Response 200
+ Response 404
## Authentication [/user/login]
@@ -44,43 +40,72 @@ Authenticate one user to access protected routing.
### Authenticate a user [POST]
+ Request (application/json)
+ Attributes (Login)
+ Headers
Accept: application/json
+ Body
{
"username": "user",
"password": "myrealpassword"
}
+ Response 200 (application/json)
+ Attributes
+ token: <token>
+ refreshToken: `<refresh-token>`
+ Body
+ Response 401 (application/json)
+ Attributes (InvalidCredentials)
{
"token": "<token>",
"refreshToken": "<token>"
}
+ Response 401
## Token refresh [/user/refresh_token]
### Refresh JWT token [POST]
+ Request (application/json)
+ Attributes
+ refreshToken: `<refresh-token>`
+ Headers
Accept: application/json
+ Body
{
"refreshToken": "<refresh-token>"
}
+ Response 200 (application/json)
+ Attributes
+ token: <token>
+ refreshToken: `<refresh-token>`
+ Body
{
"token": "<token>",
"refreshToken": "<refresh-token>"
}
+ Response 401
+ Response 401 (application/json)
+ Attributes (InvalidCredentials)
## User Info [/user/me]
Receive the username and email from the currently logged in user
### Get User Info [GET]
+ Request (application/json)
+ Request
+ Headers
Authorization: Bearer <token>
Authorization: Bearer <token>
Accept: application/json
+ Response 200 (application/json)
+ Attributes
+ user: (object)
+ username: babar (string)
+ Body
{
"user": {
"username": "user"
}
}
+ Response 401