I'm working on an OAUTH proxy but I always get this result in the response: "refresh_token_expires_in" : "0".
The code for generate access token policy is:
<Operation>GenerateAccessToken</Operation>
<ExpiresIn>3600000</ExpiresIn>
<RefreshTokenExpiresIn>86400000</RefreshTokenExpiresIn>
<SupportedGrantTypes>
<GrantType>client_credentials</GrantType>
</SupportedGrantTypes>
<GrantType>request.queryparam.grant_type</GrantType>
<GenerateResponse enabled="true"/>
I also have Refresh access token policy.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OAuthV2 name="RefreshAccessToken">
<Operation>RefreshAccessToken</Operation>
<ExpiresIn>180000</ExpiresIn>
<GrantType>request.queryparam.grant_type</GrantType>
<GenerateResponse/>
</OAuthV2>
I have tried different ways based on Apigee Doc but no luck. Can someone help me with any ideas?
You are using grant type client_credentilas.
<GrantType>client_credentials</GrantType>
In Oauth 2.0 , grant type client_credentials doesn't support refresh token, so Apigee also doesn't generate refresh token for that.
You can make use of other grant types, al other 3 grant types support refresh token.
Thank you.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |