Authentication¶
Login¶
-
POST
/login/username
¶ Login using username and password.
Example request:
POST /login/username HTTP/1.1 Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "username": "devxoul", "photo": null, "created_at": "2017-02-21T16:59:35+0000", "id": 1 }
Form Parameters: - username – Username of the user
- password – Password of the user
Status Codes: - 200 OK – Succeeded to login
- 400 Bad Request – Missing or wrong parameters
Join¶
-
POST
/join/username
¶ Create a new user with username and password.
Example request:
POST /join/username HTTP/1.1 Accept: application/json
Example response:
HTTP/1.1 201 OK Content-Type: application/json { "username": "devxoul", "photo": null, "created_at": "2017-02-21T16:59:35+0000", "id": 1 }
Form Parameters: - username – Username of the user
- password – Password of the user
Status Codes: - 201 Created – Succeeded to create a new user
- 400 Bad Request – Missing or wrong parameters
- 409 Conflict – User already exists