Updated Authentication (markdown)
+46
-1
@@ -1 +1,46 @@
|
|||||||
### Authentication
|
## Authentication
|
||||||
|
### Retrieving token
|
||||||
|
**URI**: https://icarus-demo.com/api/v1/login
|
||||||
|
**Method**: Post
|
||||||
|
**Content type**: application/json
|
||||||
|
**Request body**:
|
||||||
|
```Json
|
||||||
|
{
|
||||||
|
"username" : "phoenix",
|
||||||
|
"password" : "Flame"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
**Response body**:
|
||||||
|
```Json
|
||||||
|
{
|
||||||
|
"id" : 1,
|
||||||
|
"username" : "phoenix",
|
||||||
|
"token" : "dsfsdfnisdnosnfwefh923hr329hf29fb293fhn20jf20f",
|
||||||
|
"token_type" : "Bearer",
|
||||||
|
"expiration" : 8000
|
||||||
|
}
|
||||||
|
```
|
||||||
|
### Register
|
||||||
|
**URI**: https://icarus-demo.com/api/v1/register
|
||||||
|
**Method**: Post
|
||||||
|
**Content type**: application/json
|
||||||
|
**Request body**:
|
||||||
|
```Json
|
||||||
|
{
|
||||||
|
"first_name" : "Atman",
|
||||||
|
"last_name" : "Heron",
|
||||||
|
"username" : "ateron",
|
||||||
|
"nickname" : "heron",
|
||||||
|
"password" : "secret",
|
||||||
|
"email" : "elysium@aaru.org",
|
||||||
|
"phone_number" : "(789) 555-841"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
**Response body**:
|
||||||
|
```Json
|
||||||
|
{
|
||||||
|
"username" : "ateron",
|
||||||
|
"successfully_registered" : true,
|
||||||
|
"message" : "User successfully registered"
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user