Class JWTSecurityContext

  • All Implemented Interfaces:
    jakarta.ws.rs.core.SecurityContext

    public class JWTSecurityContext
    extends Object
    implements jakarta.ws.rs.core.SecurityContext
    A delegating JAX-RS SecurityContext that provides access to the JsonWebToken.

    Based on SmallRye JWT.

    • Method Detail

      • getUserPrincipal

        public Principal getUserPrincipal()
        Specified by:
        getUserPrincipal in interface jakarta.ws.rs.core.SecurityContext
      • isUserInRole

        public boolean isUserInRole​(String role)
        Specified by:
        isUserInRole in interface jakarta.ws.rs.core.SecurityContext
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface jakarta.ws.rs.core.SecurityContext
      • getAuthenticationScheme

        public String getAuthenticationScheme()
        Specified by:
        getAuthenticationScheme in interface jakarta.ws.rs.core.SecurityContext