go-jwtserver/api.http

32 lines
526 B
HTTP

@host = http://localhost:3001
@authToken = ""
@refreshToken = ""
# Register user
# @name register
POST {{host}}/api/user/new
content-type: application/json
{
"email": "toto@test.com",
"password": "toto"
}
###
#Login user
# @name login
POST {{host}}/api/user/login
content-type: application/json
{
"email": "toto@test.com",
"password": "toto"
}
###
#Refresh user
@refreshToken = {{login.response.body.refresh_token}}
# @name refresh
POST {{host}}/api/user/refresh
Authorization: Bearer {{refreshToken}}