On Wednesday, January 16, 2019, Nilasini Thirunavukkarasu <[email protected]>
wrote:

> Hi Shiva,
>
> If you want to add a new claim to the token response then you could
> achieve that by following the below steps.
>
>    1. Enable AuthorizationContextTokenGeneration as mentioned in [1]
>    2. Invoke the introspection endpoint with the required claims (if it
>    is more than then it should be comma separated values) similar to below
>    request.
>
>    curl -k -u admin:admin -H 'Content-Type: application/x-www-form-
>    urlencoded' -X POST --data 
> 'token=bff07310-610b-33c1-8d79-95c8c93024e6&*required_claims=http://wso2.org/claims/emailaddress
>    <http://wso2.org/claims/emailaddress>*' https://localhost:9443/oauth2/
>    introspect
>    3. Then you will get a JWT with your introspection response. If you
>    decode the JWT you could see that the requested claims will be retrieved
>    through the JWT.
>
>
> [1] https://docs.wso2.com/display/IS570/JWT+Token+
> Generation#JWTTokenGeneration-Configurations
>
> Thanks,
> Nila.
>
> On Tue, Jan 15, 2019 at 5:41 PM Shiva Kumar K R <[email protected]>
> wrote:
>
>> Hi WSO2 Team,
>> I am using oauth2 token introspection API to verify token status and get
>> user information. Is it possible to customize the response body of this API
>> like adding new claim or modifying existing claim?
>>
>> Thank you,
>> Shiva
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Nilasini Thirunavukkarasu
> Software Engineer - WSO2
>
> Email : [email protected]
> Mobile : +94775241823
> Web : http://wso2.com/
>
>
> <http://wso2.com/signature>
>


-- 
Farasath Ahamed
Senior Software Engineer, WSO2 Inc.; http://wso2.com
Mobile: +94777603866
Blog: blog.farazath.com
Twitter: @farazath619 <https://twitter.com/farazath619>
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to