mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
336 B
9 lines
336 B
2 weeks ago
|
#!/bin/bash
|
||
|
|
||
|
CLIENTID=$1
|
||
|
CLIENTSECRET=$2
|
||
|
|
||
|
TOKEN=$(curl -k -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic $(echo -n ${CLIENTID}:${CLIENTSECRET} | base64 )" --data "grant_type=client_credentials" "http://mydomain.com/auth/realms/myrealm/protocol/openid-connect/token" -s | jq -r .access_token)
|
||
|
|
||
|
echo $TOKEN
|