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

Add support for Feign on OAuth2 protected resources #56

Closed
theevangelista opened this issue Apr 5, 2015 · 5 comments
Closed

Add support for Feign on OAuth2 protected resources #56

theevangelista opened this issue Apr 5, 2015 · 5 comments

Comments

@theevangelista
Copy link
Contributor

I'll be nice if we have some kind of support to include authorization on Feign requests, since I came across this issue, as asked on StackOverflow. I could fix it to my needs, thanks to @dsyer.

I can try to contribuite to this with my implementation, I just don't know how to test this with TDD 😞

Here is the implemetation on a gist

@spencergibb
Copy link
Contributor

The other problem here is that feign config is currently all or nothing see spring-cloud-netflix/issues/288

@theevangelista
Copy link
Contributor Author

@spencergibb I can't follow the #288 link

@spencergibb
Copy link
Contributor

fixed. Your gist looks good btw. Testing is a bit difficult :-)

@theevangelista
Copy link
Contributor Author

😊 Thanks!

@cbornet
Copy link

cbornet commented Jan 8, 2016

The token is refreshed based on isExpired. Cannot there be some race conditions when requests are made close to the expiration ? Some other implementations also renew the token on HTTP 401 error but this cannot be done with request interceptor obviously.

jannikweichert pushed a commit to jannikweichert/spring-cloud-security that referenced this issue Aug 4, 2017
In case the current context there is no token available an attempt
to get one using token provider will be executed similarly to
OAuth2RestTemplate does.

Fixes spring-atticgh-56, fixes spring-atticgh-75
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