Author: Not specified Language: bash
Description: Not specified Timestamp: 2018-04-06 14:28:44 +0000
View raw paste Reply
KC_REALM=master
KC_USERNAME=admin
KC_PASSWORD=password
KC_CLIENT=client
KC_CLIENT_SECRET=0108d23e-3227-4764-bec8-ee9b8a966b38
KC_URL="keycloak.dev.pricing.bs2020.cargarantie.com/auth"

KC_RESPONSE=$( \
    curl -k -v -X POST \
            -d "username=$KC_USERNAME" \
            -d "password=$KC_PASSWORD" \
         -d 'grant_type=password' \
         -d "client_id=$KC_CLIENT" \
         -d "client_secret=$KC_CLIENT_SECRET" \
         "$KC_URL/realms/$KC_REALM/protocol/openid-connect/token"  | jq .
 )
KC_ACCESS_TOKEN=$(echo $KC_RESPONSE| jq -r .access_token)
View raw paste Reply