Class DefaultSecurityContext
- java.lang.Object
- 
- org.apache.cxf.interceptor.security.DefaultSecurityContext
 
- 
- All Implemented Interfaces:
- LoginSecurityContext,- SecurityContext
 
 public class DefaultSecurityContext extends Object implements LoginSecurityContext SecurityContext which implements isUserInRole using the following approach : skip the first Subject principal, and then checks Groups the principal is a member of
- 
- 
Constructor SummaryConstructors Constructor Description DefaultSecurityContext(String principalName, Subject subject)DefaultSecurityContext(Principal p, Subject subject)DefaultSecurityContext(Subject subject)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckGroup(Principal principal, String role)SubjectgetSubject()Returns the Subject representing the current authenticated user.PrincipalgetUserPrincipal()Set<Principal>getUserRoles()Returns a set of Principals representing the roles assigned to the current authenticated user Principalstatic booleanisGroupPrincipal(Principal principal)booleanisUserInRole(String role)
 
- 
- 
- 
Method Detail- 
getUserPrincipalpublic Principal getUserPrincipal() - Specified by:
- getUserPrincipalin interface- SecurityContext
 
 - 
isUserInRolepublic boolean isUserInRole(String role) - Specified by:
- isUserInRolein interface- SecurityContext
 
 - 
getSubjectpublic Subject getSubject() Description copied from interface:LoginSecurityContextReturns the Subject representing the current authenticated user.- Specified by:
- getSubjectin interface- LoginSecurityContext
- Returns:
- the subject
 
 - 
getUserRolespublic Set<Principal> getUserRoles() Description copied from interface:LoginSecurityContextReturns a set of Principals representing the roles assigned to the current authenticated user Principal- Specified by:
- getUserRolesin interface- LoginSecurityContext
- Returns:
- the roles
 
 - 
isGroupPrincipalpublic static boolean isGroupPrincipal(Principal principal) 
 
- 
 
-