RefreshToken expiry as sliding window

Hello,

Is it possible to set the RefreshToken expiry value as a sliding window value. Want to extend the expiry based on when it was used last to get a new access token 

Thanks

 

Solved Solved
0 1 131
1 ACCEPTED SOLUTION

In Apigee, When you use the OAuthV2 policy with Operation = RefreshAccessToken, the result is a new access token and a new refresh token, both with new expiries. So it is something like "a sliding window", but ... these are new tokens with new expiries.  You will not have the old token with an updated expiry. In fact in Apigee there is no way to update the expiry of a token, either access or refresh, after the token has been generated. Refresh tokens are one-time-use only. 

Here's a sample API proxy that shows the use of RefreshAccessToken.

View solution in original post

1 REPLY 1

In Apigee, When you use the OAuthV2 policy with Operation = RefreshAccessToken, the result is a new access token and a new refresh token, both with new expiries. So it is something like "a sliding window", but ... these are new tokens with new expiries.  You will not have the old token with an updated expiry. In fact in Apigee there is no way to update the expiry of a token, either access or refresh, after the token has been generated. Refresh tokens are one-time-use only. 

Here's a sample API proxy that shows the use of RefreshAccessToken.