28 lines
741 B
Plaintext
28 lines
741 B
Plaintext
|
### Create account
|
||
|
POST http://127.0.0.1:8080/api/auth/signup
|
||
|
Content-Type: application/json
|
||
|
|
||
|
{"username": "root@mattv.de", "password": "123"}
|
||
|
|
||
|
### Wrong authenctication
|
||
|
POST http://127.0.0.1:8080/api/auth/login
|
||
|
Content-Type: application/json
|
||
|
|
||
|
{"username": "root@mattv.de", "password": "this is not correct"}
|
||
|
|
||
|
### Correct authentication
|
||
|
POST http://127.0.0.1:8080/api/auth/login
|
||
|
Content-Type: application/json
|
||
|
|
||
|
{"username": "root@mattv.de", "password": "123"}
|
||
|
|
||
|
> {% client.global.set("auth_token", response.body.jwt); %}
|
||
|
|
||
|
### Check if authenticated with admin perms
|
||
|
GET http://127.0.0.1:8080/test/hello2
|
||
|
Authorization: Bearer {{auth_token}}
|
||
|
|
||
|
|
||
|
### Refresh token
|
||
|
POST http://127.0.0.1:8080/api/auth/refresh
|
||
|
Authorization: Bearer {{auth_token}}
|