2018-07-25 22:26:53 +02:00
|
|
|
### Authorization by token, part 1. Retrieve and save token.
|
|
|
|
POST http://localhost:8080/api/v1/login
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
|
|
{
|
2019-07-18 18:38:21 +02:00
|
|
|
"username": "user3",
|
2018-12-04 11:16:42 +01:00
|
|
|
"password": "1234"
|
2018-07-25 22:26:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
> {% client.global.set("auth_token", response.body.token); %}
|
2018-07-26 09:53:32 +02:00
|
|
|
|
2018-10-27 15:14:55 +02:00
|
|
|
### Register
|
2018-09-06 08:42:18 +02:00
|
|
|
|
|
|
|
POST http://localhost:8080/api/v1/register
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
|
|
{
|
2018-12-29 15:29:50 +01:00
|
|
|
"username": "user",
|
2018-09-06 08:42:18 +02:00
|
|
|
"password": "1234",
|
2018-12-01 00:26:56 +01:00
|
|
|
"email": "5@knt.li"
|
2018-09-06 08:42:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
2019-04-21 20:18:17 +02:00
|
|
|
# Token test
|
|
|
|
POST http://localhost:8080/api/v1/tokenTest
|
|
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
|
|
###
|