mirror of https://github.com/01-edu/public.git
KostLinux
2 weeks ago
committed by
Zouhair AMAZZAL
4 changed files with 16 additions and 10 deletions
@ -0,0 +1 @@
|
||||
.env |
@ -0,0 +1,6 @@
|
||||
# alpeso-test |
||||
alpeso-test |
||||
|
||||
## How-to use |
||||
|
||||
Simple run ```./keycloack.sh test test1``` where test = keycloak user id and test1 = keycloak client secret. |
@ -0,0 +1,8 @@
|
||||
#!/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 |
Loading…
Reference in new issue