Interface SecurityContext
public interface SecurityContext
Security context in which an endpoint is being invoked.
- Since:
- 2.0.0
- Author:
- Andy Wilkinson
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionReturn the currently authenticatedPrincipalornull.booleanisUserInRole(String role) Returnstrueif the currently authenticated user is in the givenrole, or false otherwise.
- 
Field Details- 
NONEEmpty security context.
 
- 
- 
Method Details- 
getPrincipalPrincipal getPrincipal()Return the currently authenticatedPrincipalornull.- Returns:
- the principal or null
 
- 
isUserInRoleReturnstrueif the currently authenticated user is in the givenrole, or false otherwise.- Parameters:
- role- name of the role
- Returns:
- trueif the user is in the given role
 
 
-