Apply authorization via CURL with URIs

Hi I am trying to do authorization queries, but I would like to execute the queries via uri resource not about name… I don’t see any documentation related with this and I don’t see too much examples,. doesn’t it can be done? Which is the objective for the resource uri? my commands are like:

curl -X POST \
  http://localhost/realms/product-mwc-dev/protocol/openid-connect/token \
  -H "Authorization: Bearer my jwt token" \
  --data "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket" \
  --data "audience=myclientid" \
  --data "permission=/api/v1/endpoint"

I don’t see more information about the authorization requests or how to use these resource ids…


I believe you want to use something like this:

curl -X POST \
  http://${host}:${port}/realms/${realm}/protocol/openid-connect/token \
  -H "Authorization: Bearer ${access_token}" \
  --data "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket" \
  --data "audience={resource_server_client_id}" \
  --data "permission=Resource A#Scope A" \
  --data "permission=Resource B#Scope B"

Go to the Authorization Services Guide and get a better understanding there. But, before using curl, do some experimenting and tests with the Evaluate tool in Authorization section of your client.

Thanks for your reply. In fact, currently we are doing this… but we would like to do it with the URI variable that it is included in the Resource… Also, my problem was that I have some gaps… I read this “authorization services” article. but I am not sure if it explains how to uris for the resources…