Interface AuthConstraintUserInterrogator
- All Known Implementing Classes:
PassthroughUserInterrogator
public interface AuthConstraintUserInterrogator
Extension point to allow for the abstraction of AuthConstraint
role
requirement strings from the actual user roles from CurrentUser
.
The intention of this interface is to allow an application to consult user roles and local configuration to determine a set
of capabilities a user should have, and to allow AuthConstraint
annotations to reference those capabilities rather than the user's raw group data.
SessionScoped
scope.-
Method Summary
Modifier and TypeMethodDescriptiongetUser()
Returns the underlying user record for the current user, for retrieving Access Refuser, etc.
The return of this method will not be used to bypass thehasRole(String)
method on the interrogatorboolean
Determines if the current user has a named role/capability
-
Method Details
-
hasRole
Determines if the current user has a named role/capability- Parameters:
role
- some role/capability name- Returns:
- true if the user has this role/capability, otherwise false
-
getUser
CurrentUser getUser()Returns the underlying user record for the current user, for retrieving Access Refuser, etc.
The return of this method will not be used to bypass thehasRole(String)
method on the interrogator- Returns:
-