File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,16 @@ curl -X POST "https://<KEYCLOAK_HOST>/realms/<REALM_NAME>/protocol/openid-connec
1818 -d " client_secret=<CLIENT_SECRET>"
1919```
2020
21- If the ` grant_type ` is set for password authentication, you can get a bearer with the following request :
21+ If the ` grant_type ` is set for password authentication the request will also require a username and password :
2222
2323``` shell
24- USERNAME=backups@libremfg.com \
25- && PASSWORD=password \
26- && curl --location \
27- --request POST " ${BAAS_OIDC_URL} /realms/libre/protocol/openid-connect/token" \
28- --header ' Content-Type\ application/x-www-form-urlencoded' \
29- --data-urlencode ' grant_type=password' \
30- --data-urlencode " username=${USERNAME} " \
31- --data-urlencode " password=${PASSWORD} " \
32- --data-urlencode " client_id=${BAAS_OIDC_CLIENT_ID} " \
33- --data-urlencode " client_secret=${OIDC_SECRET} " | jq .access_token
24+ curl -X POST " https://<KEYCLOAK_HOST>/realms/<REALM_NAME>/protocol/openid-connect/token" \
25+ -H " Content-Type: application/x-www-form-urlencoded" \
26+ -d " grant_type=password" \
27+ -d " client_id=<CLIENT_ID>" \
28+ -d " client_secret=<CLIENT_SECRET>" \
29+ -d " username=<USERNAME>" \
30+ -d " password=<PASSWORD>"
3431```
3532
3633## Response
You can’t perform that action at this time.
0 commit comments