So I created a Policy to get the details of the token based on the documentation w/ the ff. code.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <GetOAuthV2Info async="false" continueOnError="false" enabled="true" name="OA-GetTokenDetails"> <DisplayName>OA-GetTokenDetails</DisplayName> <AccessToken ref="request.queryparam.accesstoken"/> </GetOAuthV2Info>
But, I'm not seeing the contents of a token in the Trace tool or Request Body of my request. How do I know if my access token has the proper values I want it to have?.
It's just that I have a policy that removes personal information from the the custom attributes of my access token and I want to check whether if the information was actually remove from the token alright.
Solved! Go to Solution.
hi @Joshua Cariño,
you can use javascript policy to print the output object of the policy GetOAuthV2Info
var token_info = context.getVariable('oauthv2accesstoken.OA-GetTokenDetails');
you can take the reference here - https://docs.apigee.com/api-platform/reference/policies/get-oauth-v2-info-policy
you can print individual attribute also.