Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

OAuth2 intercepter for feign does not re-issue invalid token #220

Open
ArtyomGabeev opened this issue Sep 2, 2019 · 3 comments
Open

OAuth2 intercepter for feign does not re-issue invalid token #220

ArtyomGabeev opened this issue Sep 2, 2019 · 3 comments

Comments

@ArtyomGabeev
Copy link

Hi,

If we check OAuth2RestTemplate it has an option retryBadAccessTokens which will try one more time to obtain new access token if previous token is invalid.
This is useful if, for some reasons, you decide to revoke access token.

In OAuth2FeignRequestInterceptor access token is preserved in client context until it expires.
There is no way to make feign to reissue new token until it expire.

The difficulty here that in feign interceptor is not responsible for retry. So what will be correct way to handle this issue? One of the option is to implement a feign retryer which will clean up client context.

If it is correct, do you want me to try to contribute this change?

@ryanjbaxter
Copy link
Contributor

Sure we would be happy to review an enhancement

@ArtyomGabeev
Copy link
Author

@ryanjbaxter done.
But I did not find any documentation about OAuth2Interecptor in feign, so I'm not sure where should I need to document new retyer.

Thanks.

@ryanjbaxter
Copy link
Contributor

@ArtyomGabeev are you not sure where the documentation is, or where to put it in the documentation itself

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants