Examples - Authentication service Introducer Supplier
This example uses variables from one response (for logon) to then use for the call to whoami and then to refresh.
@host=https://api.themovingportal.dev
### Check authentication - no header
GET {{host}}/auth/WhoAmI
### Login
# @name login
POST {{host}}/auth/login
Content-Type: application/json
{
"username": "USERNAME",
"password": "PASSWORD",
"email": ""
}
### Using Bearer authentication header
GET {{host}}/auth/WhoAmI
Authorization: Bearer {{login.response.body.$.accessToken}}
### Refresh
# @name refresh
POST {{host}}/auth/refresh
Content-Type: application/json
{
"refreshToken": "{{login.response.body.$.refreshToken}}"
}
### Using Bearer authentication header
GET {{host}}/auth/WhoAmI
Authorization: Bearer {{refresh.response.body.$.accessToken}}
