Authentication in Postman
To authenticate in Postman, create a new request
POST <https://aeropost-dev-stage.cloud-iam.com/auth/realms/core/protocol/openid-connect/token>
Body x-www-form-urlencoded
client_id = test_client
client_secret = ut1tKa1EVlVCg6Mx5daKYhhaQMPHix1l
grant_type = password
username = test
password = test_password
scope = openid
You may add this code to automatically save to {{token}} Postman variable every time you hit the auth endpoint. Put this in "Tests" in the same request window.
let res = pm.response.json();
pm.collectionVariables.set('token', res.access_token);
Once you get a token you can hit the Core app endpoints like 127.0.0.1/api/test
by placing {{token}}
variable under "Authorization > Bearer Token" in Postman
Updated about 1 year ago