Interface SecurityContext
- All Known Implementing Classes:
- CommandContext,- GenericServlet.ServletSecurityContext,- HTTPContext,- MultiUserSecurityContext,- ServiceContext,- SNSContext
public interface SecurityContext
An interface used by access controllers to query context data to determine access.
- Since:
- 1.0
- Version:
- 8.6
- Author:
- Luke
- 
Method SummaryModifier and TypeMethodDescriptionReturns the current servlet request.getRoles()Returns all the roles for the currently authenticated user.getUser()Returns the currently authenticated user.booleanQueries if the current user is authenticated or anonymous.booleanisUserInRole(String roleName) Returns if the user is a member of a particular security role.
- 
Method Details- 
isAuthenticatedboolean isAuthenticated()Queries if the current user is authenticated or anonymous.- Returns:
- TRUE if a user is logged in, otherwise FALSE
 
- 
getUserPilot getUser()Returns the currently authenticated user.- Returns:
- the user's Person object, or null if anonymous
 
- 
getRolesCollection<String> getRoles()Returns all the roles for the currently authenticated user.- Returns:
- a Collection of role names, or an empty collection
 
- 
isUserInRoleReturns if the user is a member of a particular security role.- Parameters:
- roleName- the role name
- Returns:
- TRUE if the user is a member of the role, otherwise FALSE
 
- 
getRequestHttpServletRequest getRequest()Returns the current servlet request. Some access controllers may need to examine attributes within the servlet request.- Returns:
- the HTTP servlet request
 
 
-