Package io.muserver.rest
Interface Authorizer
-
public interface AuthorizerA class that can check if a principle is in a given role.- See Also:
BasicAuthSecurityFilter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisInRole(java.security.Principal principal, java.lang.String role)Checks if a user is in a role
-
-
-
Method Detail
-
isInRole
boolean isInRole(java.security.Principal principal, java.lang.String role)Checks if a user is in a role- Parameters:
principal- The user, which was created byUserPassAuthenticator.authenticate(String, String)role- A role to check- Returns:
- Returns true if the user is in the given role; otherwise false.
-
-