Skip to content

Commit

Permalink
add http-client-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSebastian committed Apr 4, 2024
1 parent b3e9f47 commit 5cd7484
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions stack/http_requests/docker.keycloak.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### get token for keycloak_test
POST http://localhost:8100/auth/realms/wls_realm/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded

password = test &
grant_type = password &
client_secret = top-secret &
client_id = wls &
username = keycloak_test

> {%
client.global.set("auth_token", response.body.access_token);
client.global.set("token_type", response.body.token_type);
%}

### get token for wls_all
POST http://localhost:8100/auth/realms/wls_realm/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded

password = test &
grant_type = password &
client_secret = top-secret &
client_id = wls &
username = wls_all

> {%
client.global.set("auth_token", response.body.access_token);
client.global.set("token_type", response.body.token_type);
%}

### get userinfo with auth_token
GET http://localhost:8100/auth/realms/wls_realm/protocol/openid-connect/userinfo
Authorization: {{ token_type }} {{ auth_token }}

0 comments on commit 5cd7484

Please sign in to comment.