Skip to content

Can't access api via curl #5

@PatrickHuetter

Description

@PatrickHuetter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions