Rutvij07
Rutvij07

Reputation: 375

Want resource URIs data in token api in Keycloak using User Access Token

I have created resources inside client and have given URIs data in it

enter image description here

Now when I am trying to fetch this resource data using my user access token

this is my CURL request

curl --location ‘{domain}/realms/{realm}/protocol/openid-connect/token’
–header ‘Content-Type: application/x-www-form-urlencoded’
–header 'Authorization: Bearer {token}
–data-urlencode ‘grant_type=urn:ietf:params:oauth:grant-type:uma-ticket’
–data-urlencode ‘audience={client_id}’
–data-urlencode ‘response_mode=permissions’ \

Response

[
    {
        "scopes": [
            "read"
        ],
        "rsid": "f4cdcc0d-aebc-4b9f-8e4d-c89f4d48a5ac",
        "rsname": "read-terminal"
    }
]

So what I need is, is there any way in which I can also return my URIs data in this response

Expected Response which will solve my usecase

[
    {
        "scopes": [
            "read"
        ],
        "rsid": "f4cdcc0d-aebc-4b9f-8e4d-c89f4d48a5ac",
        "rsname": "read-terminal"
        "uris":['/Reports/list','/Reports/recurringReports']
    }
]

Or any other method from which I can fetch URIs data using my user access token

Upvotes: 0

Views: 56

Answers (0)

Related Questions