Package digilib.auth

Interface AuthnOps

    • Method Detail

      • 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.