Class DefaultSecurityContext
java.lang.Object
org.apache.cxf.interceptor.security.DefaultSecurityContext
- All Implemented Interfaces:
LoginSecurityContext
,SecurityContext
SecurityContext which implements isUserInRole using the
following approach : skip the first Subject principal, and then checks
Groups the principal is a member of
-
Constructor Summary
ConstructorDescriptionDefaultSecurityContext
(String principalName, Subject subject) DefaultSecurityContext
(Principal p, Subject subject) DefaultSecurityContext
(Subject subject) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkGroup
(Principal principal, String role) Returns the Subject representing the current authenticated user.Returns a set of Principals representing the roles assigned to the current authenticated user Principalstatic boolean
isGroupPrincipal
(Principal principal) boolean
isUserInRole
(String role)
-
Constructor Details
-
DefaultSecurityContext
-
DefaultSecurityContext
-
DefaultSecurityContext
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfaceSecurityContext
-
isUserInRole
- Specified by:
isUserInRole
in interfaceSecurityContext
-
checkGroup
-
getSubject
Description copied from interface:LoginSecurityContext
Returns the Subject representing the current authenticated user.- Specified by:
getSubject
in interfaceLoginSecurityContext
- Returns:
- the subject
-
getUserRoles
Description copied from interface:LoginSecurityContext
Returns a set of Principals representing the roles assigned to the current authenticated user Principal- Specified by:
getUserRoles
in interfaceLoginSecurityContext
- Returns:
- the roles
-
isGroupPrincipal
-