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.

Implementations of this interface will be bound in the SessionScoped scope.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 the hasRole(String) method on the interrogator
    boolean
    Determines if the current user has a named role/capability
  • Method Details

    • hasRole

      boolean hasRole(String role)
      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 the hasRole(String) method on the interrogator
      Returns: