Class SecurityContextImpl

java.lang.Object
ee.jakarta.tck.ws.rs.common.impl.SecurityContextImpl
All Implemented Interfaces:
jakarta.ws.rs.core.SecurityContext

public class SecurityContextImpl extends Object implements jakarta.ws.rs.core.SecurityContext
This is simple implementation of a SecurityContext interface There are two constructors, the default representing dummy SecurityContext with no principal, scheme and role, and a constructor with principal scheme and information about whether the connection is secure and whether user is in role
  • Constructor Details

    • SecurityContextImpl

      public SecurityContextImpl(String principal, boolean isUserInRole, boolean isSecure, String scheme)
      Representation of principal, role, scheme, and secure connection
    • SecurityContextImpl

      public SecurityContextImpl()
      Dummy security context
  • Method Details

    • 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