java.lang.Object
io.helidon.security.integration.jersey.SecurityFilter
All Implemented Interfaces:
ContainerRequestFilter, ContainerResponseFilter

@Priority(1000) @ConstrainedTo(SERVER) public class SecurityFilter extends Object implements ContainerRequestFilter, ContainerResponseFilter
A filter that handles authentication and authorization.
  • Constructor Details

    • SecurityFilter

      public SecurityFilter()
      Default constructor to be used by Jersey when creating an instance of this class.
  • Method Details

    • postConstruct

      @PostConstruct public void postConstruct()
      A life-cycle method invoked by Jersey that finished initialization of the filter.
    • filter

      public void filter(ContainerRequestContext request)
      Specified by:
      filter in interface ContainerRequestFilter
    • processSecurity

      protected void processSecurity(ContainerRequestContext request, io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext filterContext, SecurityTracing tracing, SecurityContext securityContext)
    • filter

      public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
      Specified by:
      filter in interface ContainerResponseFilter
    • initRequestFiltering

      protected io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext initRequestFiltering(ContainerRequestContext requestContext)
    • logger

      protected Logger logger()
    • doFilter

      protected void doFilter(ContainerRequestContext request, SecurityContext securityContext)
    • authenticate

      protected void authenticate(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityContext securityContext, AtnTracing atnTracing)
    • processAuthentication

      protected void processAuthentication(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityClientBuilder<AuthenticationResponse> clientBuilder, io.helidon.security.integration.jersey.SecurityDefinition methodSecurity, AtnTracing atnTracing)
    • authorize

      protected void authorize(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityContext securityContext, AtzTracing atzTracing)
    • processAuthorization

      protected void processAuthorization(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityClientBuilder<AuthorizationResponse> clientBuilder)
    • abortRequest

      protected void abortRequest(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityResponse response, int defaultStatusCode, Map<String,List<String>> defaultHeaders)
    • updateHeaders

      protected void updateHeaders(Map<String,List<String>> responseHeaders, Response.ResponseBuilder responseBuilder)
    • configureContext

      protected io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext configureContext(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, ContainerRequestContext requestContext, UriInfo uriInfo)
    • security

      protected Security security()
    • featureConfig

      protected io.helidon.security.integration.jersey.FeatureConfig featureConfig()