Package digilib.auth
Interface AuthnOps
- All Known Implementing Classes:
IpAuthnOps
,IpOpenIdAuthnOps
,IpServletAuthnOps
,OpenIdAuthnOps
public interface AuthnOps
Class of operations providing authentication.
-
Method Summary
Modifier and TypeMethodDescriptiongetUserRoles
(DigilibRequest request) Return the list of roles associated with the user represented by request.boolean
Return if the implementation supports getUserRoles().void
init
(DigilibConfiguration dlConfig) Configure this AuthnOps instance.boolean
isUserInRole
(DigilibRequest request, String role) Test if the user represented by request has the given role.
-
Method Details
-
isUserInRole
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
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
Configure this AuthnOps instance.- Parameters:
dlConfig
- current DigilibConfiguration- Throws:
AuthOpException
- Exception thrown on error.
-