Reputation: 718
I have been searching on google the list of available roles in spring security, but I haven't been able to get the complete list.
¿Could someone help me with this?
This is what I've found: ROLE_ADMIN, ROLE_USER, ROLE_VISITOR.
Upvotes: 2
Views: 2371
Reputation: 7792
As Markus said there are no fixed number of roles in spring security.
Have a look at the javadoc for org.springframework.security.core.GrantedAuthority
.
Extending it allows you to override the getAuthority
method from which you can return any role string you like.
Upvotes: 1
Reputation: 7331
The list of roles is not dictated by Spring Security, but is entirely up to what is required in a particular application.
The list of roles could for example be stored in the application's database. See for an example Spring Security's JdbcUserDetailsManager class which can be readily used to manage users, roles and authorities (privileges) in the database.
Upvotes: 5