Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save neerajkanhere/5b0d4f3e398734d916557e836fccce8d to your computer and use it in GitHub Desktop.

Select an option

Save neerajkanhere/5b0d4f3e398734d916557e836fccce8d to your computer and use it in GitHub Desktop.

Revisions

  1. @luszczynski luszczynski revised this gist Nov 25, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion keycloak_get_idp_token.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Get IDP Token
    # Keycloak - Get IDP Token

    ## Get Access Token

  2. @luszczynski luszczynski revised this gist Nov 19, 2019. No changes.
  3. @luszczynski luszczynski created this gist Nov 19, 2019.
    18 changes: 18 additions & 0 deletions keycloak_get_idp_token.md
    Original 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 .
    ```