Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to retrieve short for subject in Oauth2 accesstoken

Hi Team,

I am setting the custom attribute related to userinfo in generate access token policy(oauth2).

EX:

<Attribute name="email" display="true" ref="oauthv2authcode.OA-GetAuthCodeAttributesForAccessToken.email"/>
<Attribute name="given_name" display="true" ref="oauthv2authcode.OA-GetAuthCodeAttributesForAccessToken.given_name"/>
<Attribute name="family_name" display="true" ref="oauthv2authcode.OA-GetAuthCodeAttributesForAccessToken.family_name"/>

I am able to retrieve the above custom attribute info by using getoauthinfo policy.

ex: {

"given_name":"abc",

"family_name":"xyz",

"email":"abc@gmail.com"

}

But I want to retrieve Sub value also(sub means short for subject).

ex: {

"Sub":"12341234123412341", how can I retrieve the sub vlaue?

"given_name":"abc",

"family_name":"xyz",

"email":"abc@gmail.com"

}

Sub":"12341234123412341", how can I retrieve the sub vlaue?

Thanks,

Kumar.

0 2 499
2 REPLIES 2