fileserver/old_backend/requests.http

36 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-08-28 15:37:09 +00:00
### 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}}
### A
POST https://ssh.gitlab.mattv.de/oauth/token
?redirect_uri=http%3A//127.0.0.1%3A1234/api/auth/gitlab_callback
&client_id=98bcbad78cb1f880d1d1de62291d70a791251a7bea077bfe7df111ef3c115760
&client_secret=7ee01d2b204aff3a05f9d028f004d169b6d381ec873e195f314b3935fa150959
&code=b96f91b171cf23245ea08c6f35c3831698e8683c6d0306de1396507f0f51d4c7
&grant_type=authorization_code