Class SecurityFilter
- 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 Summary
Constructors Constructor Description SecurityFilter()
Default constructor to be used by Jersey when creating an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
abortRequest(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityResponse response, int defaultStatusCode, Map<String,List<String>> defaultHeaders)
protected void
authenticate(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityContext securityContext, AtnTracing atnTracing)
protected void
authorize(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityContext securityContext, AtzTracing atzTracing)
protected io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext
configureContext(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, ContainerRequestContext requestContext, UriInfo uriInfo)
protected void
doFilter(ContainerRequestContext request, SecurityContext securityContext)
protected io.helidon.security.integration.jersey.FeatureConfig
featureConfig()
void
filter(ContainerRequestContext request)
void
filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
protected io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext
initRequestFiltering(ContainerRequestContext requestContext)
protected Logger
logger()
void
postConstruct()
A life-cycle method invoked by Jersey that finished initialization of the filter.protected void
processAuthentication(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityClientBuilder<AuthenticationResponse> clientBuilder, io.helidon.security.integration.jersey.SecurityDefinition methodSecurity, AtnTracing atnTracing)
protected void
processAuthorization(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context, SecurityClientBuilder<AuthorizationResponse> clientBuilder)
protected void
processSecurity(ContainerRequestContext request, io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext filterContext, SecurityTracing tracing, SecurityContext securityContext)
protected Security
security()
protected Entity
toRequestMessage(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context)
protected void
updateHeaders(Map<String,List<String>> responseHeaders, Response.ResponseBuilder responseBuilder)
-
-
-
Method Detail
-
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 interfaceContainerRequestFilter
-
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 interfaceContainerResponseFilter
-
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)
-
toRequestMessage
protected Entity toRequestMessage(io.helidon.security.integration.jersey.SecurityFilterCommon.FilterContext context)
-
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()
-
-