Class JwtTokenSecurityContext
- java.lang.Object
-
- org.apache.cxf.rs.security.jose.jaxrs.JwtTokenSecurityContext
-
- All Implemented Interfaces:
ClaimsSecurityContext,LoginSecurityContext,SecurityContext
public class JwtTokenSecurityContext extends Object implements ClaimsSecurityContext
-
-
Constructor Summary
Constructors Constructor Description JwtTokenSecurityContext(JwtToken jwt, String roleClaim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClaimCollectiongetClaims()SubjectgetSubject()Returns the Subject representing the current authenticated user.JwtTokengetToken()PrincipalgetUserPrincipal()Set<Principal>getUserRoles()Returns a set of Principals representing the roles assigned to the current authenticated user PrincipalbooleanisUserInRole(String role)
-
-
-
Method Detail
-
getToken
public JwtToken getToken()
-
getSubject
public Subject getSubject()
Description copied from interface:LoginSecurityContextReturns the Subject representing the current authenticated user.- Specified by:
getSubjectin interfaceLoginSecurityContext- Returns:
- the subject
-
getUserRoles
public 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 interfaceLoginSecurityContext- Returns:
- the roles
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfaceSecurityContext
-
isUserInRole
public boolean isUserInRole(String role)
- Specified by:
isUserInRolein interfaceSecurityContext
-
getClaims
public ClaimCollection getClaims()
- Specified by:
getClaimsin interfaceClaimsSecurityContext
-
-