Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to introspect an OAuth token on Apigee X?

I have an OAuth Provider API which generates token for client_credentials grant type.

 

I want to expose an "Intropsect" function, where the token is passed to the API and it returns whether the token is valid or not.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OAuthV2 continueOnError="false" enabled="true" name="IntrospectOAuth2Token">
    <DisplayName>IntrospectOAuth2Token</DisplayName>
    <Properties/>
    <Attributes/>
    <ExternalAuthorization>false</ExternalAuthorization>
    <Operation>VerifyAccessToken</Operation>
    <AccessToken>request.formparam.token</AccessToken>
    <SupportedGrantTypes/>
    <GenerateResponse enabled="true"/>
    <Tokens/>
    <RFCCompliantRequestResponse>true</RFCCompliantRequestResponse>
</OAuthV2>

 

I have used the above policy to verify the token and it's good.

 

But how can I generate a response body for valid and invalid tokens?

@dchiesa1  Please help.

0 1 1,078
1 REPLY 1