Package digilib.auth

Interface AuthnOps

All Known Implementing Classes:
IpAuthnOps, IpOpenIdAuthnOps, IpServletAuthnOps, OpenIdAuthnOps

public interface AuthnOps
Class of operations providing authentication.
  • Method Details

    • isUserInRole

      boolean isUserInRole(DigilibRequest request, String role) throws AuthOpException
      Test if the user represented by request has the given role.
      Parameters:
      request - Request with user information.
      role - role to be tested.
      Returns:
      true if the user has the role.
      Throws:
      AuthOpException - Exception thrown on error.
    • hasUserRoles

      boolean hasUserRoles()
      Return if the implementation supports getUserRoles().
      Returns:
      true if the implementation supports getUserRoles().
    • getUserRoles

      List<String> getUserRoles(DigilibRequest request) throws AuthOpException
      Return the list of roles associated with the user represented by request. Returns null if a list of roles is not available. Users of this API should check hasUserRoles().
      Parameters:
      request - current DigilibRequest
      Returns:
      list of user's roles
      Throws:
      AuthOpException - Exception thrown on error.
    • init

      void init(DigilibConfiguration dlConfig) throws AuthOpException
      Configure this AuthnOps instance.
      Parameters:
      dlConfig - current DigilibConfiguration
      Throws:
      AuthOpException - Exception thrown on error.