Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access api via curl #5

Open
PatrickHuetter opened this issue Nov 12, 2017 · 1 comment
Open

Can't access api via curl #5

PatrickHuetter opened this issue Nov 12, 2017 · 1 comment

Comments

@PatrickHuetter
Copy link

PatrickHuetter commented Nov 12, 2017

Using my browser for authentication works fine. I get redirected to auth-server, log in successfully and get redirected to zuul again and getting information from a protected microservice.

Using curl to obtain a token also works fine but using this token with the "Authorization: Bearer xxx..." header to get a resource doesn't work. I always get redirected to the login page.

Maybe this is related to:
kakawait/uaa-behind-zuul-sample#13

The documentation from the auth-server (in this project) says that getting resources via curl should be also possible. What am i doing wrong?

UPDATE
Got it working using @ResourceServer annotation instead of @EnableOAuth2Sso annotation (both isn't possible so easy at this time) and extending ResourceServerConfigurerAdapter.

...
@EnableResourceServer
public class ZuulServerApplication extends ResourceServerConfigurerAdapter {
...

I would be glad if you could provide a solution which is able to handle both.

@anilallewar
Copy link
Owner

Have tried this with SOAPUI and that worked fine with Authorization header. Can you please provide more details if possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants