-
-
Save neerajkanhere/5b0d4f3e398734d916557e836fccce8d to your computer and use it in GitHub Desktop.
Revisions
-
luszczynski revised this gist
Nov 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Keycloak - Get IDP Token ## Get Access Token -
luszczynski revised this gist
Nov 19, 2019 . No changes.There are no files selected for viewing
-
luszczynski created this gist
Nov 19, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # Get IDP Token ## Get Access Token ```bash export TKN=$(curl -X POST 'http://127.0.0.1:8080/auth/realms/your-realm/protocol/openid-connect/token' \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=your-user" \ -d 'password=your-pass' \ -d 'grant_type=password' \ -d 'client_id=admin-cli' | jq -r '.access_token') ``` ## Get IDP Token ```bash curl -v -X GET 'http://127.0.0.1:8080/auth/realms/your-realm/broker/your-provider/token' -H "Accept: application/json" -H "Authorization: Bearer $TKN" | jq . ```