HttpServletRequest isUserInRole () - How to get a full list of roles?

The HttpServletRequest isUserInRole () method returns a boolean based on whether or not a role exists. Now, if he does this, he should have a complete list of roles for the registered user somewhere. How to get a full list of roles?

+6
source share
1 answer

isUserInRole() uses a SecurityContext request that your authenticator must set. The SecurityContext interface does not provide a method that allows you to access this information, but you can do something in your authenticator to make the information available as a provider or add it as a request attribute and access it in this way.

+2
source

All Articles