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

Authority should be ROLE_USER not USER #7

Closed
alexcheng1982 opened this issue Nov 25, 2014 · 1 comment
Closed

Authority should be ROLE_USER not USER #7

alexcheng1982 opened this issue Nov 25, 2014 · 1 comment

Comments

@alexcheng1982
Copy link

In file https://github.com/spring-guides/tut-bookmarks/blob/master/security/src/main/java/bookmarks/Application.java#L143, AuthorityUtils.createAuthorityList("USER", "write") should be AuthorityUtils.createAuthorityList("ROLE_USER", "write") as Spring Security uses role ROLE_USER to check. This causes basic authentication to fail with 403 error.

Actually in the OAuth2 configuration (https://github.com/spring-guides/tut-bookmarks/blob/master/security/src/main/java/bookmarks/Application.java#L180), it's using the correct ROLE_USER.

@alexcheng1982 alexcheng1982 changed the title Authority should be ROLE_USER not USER Authority should be ROLE_USER not USER Nov 25, 2014
@gregturn
Copy link
Contributor

This tutorial was completely rewritten as of 63d3937.

I suggest you read it from the top and be sure to let us know if you spot any issues!

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