Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get scope information by token of client-credentials?

I deployed a JAS and two applications (A and B). 


A obtained an access token from JAS using client credentials mode, then use this token to access B's resources.

curl  --request POST "http://host/oidc/endpoint/jazzop/token" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data-urlencode "grant_type=client_credentials" \
 --data-urlencode "client_id=<CLIENT_ID>" \
 --data-urlencode "client_secret=<PASSWORD>" \
 --data-urlencode "scope=openid custom_scope"
=> {"access_token":"xxxxxxxxxxxxxxxxxxx","token_type":"Bearer","expires_in":7200,"scope":"openid custom_scope"}

 For B,  can obtain A's client ID from JAS. 
curl http://host/oidc/endpoint/jazzop/userinfo --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxx'
=> {"sub":"<CLIENT_ID>","iss":"https:\/\/host\/oidc\/endpoint\/jazzop"}

How can I get the scope ?
I want to check A's token must have 'custom_scope'.

1

0 votes



One answer

Permanent link

This isn't an ELM-specific question so is likely outside the scope of this forum - you may be able to find ways to decode the token by searching the wider internet for ways to decode an OIDC Bearer token.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,122

Question asked: Apr 28 '25, 5:01 a.m.

Question was seen: 871 times

Last updated: Apr 28 '25, 9:17 a.m.

Confirmation Cancel Confirm