Class JwtTokenSecurityContext

  • All Implemented Interfaces:
    org.apache.cxf.rt.security.claims.ClaimsSecurityContext, org.apache.cxf.security.LoginSecurityContext, org.apache.cxf.security.SecurityContext

    public class JwtTokenSecurityContext
    extends Object
    implements org.apache.cxf.rt.security.claims.ClaimsSecurityContext
    • Constructor Detail

      • JwtTokenSecurityContext

        public JwtTokenSecurityContext​(org.apache.cxf.rs.security.jose.jwt.JwtToken jwt,
                                       String roleClaim)
    • Method Detail

      • getToken

        public org.apache.cxf.rs.security.jose.jwt.JwtToken getToken()
      • getSubject

        public Subject getSubject()
        Specified by:
        getSubject in interface org.apache.cxf.security.LoginSecurityContext
      • getUserRoles

        public Set<Principal> getUserRoles()
        Specified by:
        getUserRoles in interface org.apache.cxf.security.LoginSecurityContext
      • getUserPrincipal

        public Principal getUserPrincipal()
        Specified by:
        getUserPrincipal in interface org.apache.cxf.security.SecurityContext
      • isUserInRole

        public boolean isUserInRole​(String role)
        Specified by:
        isUserInRole in interface org.apache.cxf.security.SecurityContext
      • getClaims

        public org.apache.cxf.rt.security.claims.ClaimCollection getClaims()
        Specified by:
        getClaims in interface org.apache.cxf.rt.security.claims.ClaimsSecurityContext