[keycloak-user] Combine grants

Corentin Dupont corentin.dupont at gmail.com
Sat Jul 14 12:48:40 EDT 2018


Another question for you guys:
is it possible to combine grants?
Now to get some permissions, I need to perform 2 requests:

USERTOKEN=`curl -X POST  -H "Content-Type:
application/x-www-form-urlencoded" -d
'username=cdupont&password=password&grant_type=password&client_id=api-server&client_secret=4e9dcb80-efcd-484c-b3d7-1e95a0096ac0'
"http://localhost:8080/auth/realms/waziup/protocol/openid-connect/token" |
jq .access_token -r`

curl -X POST
http://localhost:8080/auth/realms/waziup/protocol/openid-connect/token -H
"Authorization: Bearer $USERTOKEN" -d
"grant_type=urn:ietf:params:oauth:grant-type:uma-ticket&audience=api-server&permission=ce023344-a01e-4d3c-8ba8-dc626e088dfd#sensors:view"

The first with grant_type=password and the second with
grant_type=urn:ietf:params:oauth:grant-type:uma-ticket.
However HTTP requests are expensive...
It would be nice to make only one request.


More information about the keycloak-user mailing list