Class HttpAuthorizationFilter
- java.lang.Object
-
- dev.resteasy.client.util.authentication.HttpAuthorizationFilter
-
- All Implemented Interfaces:
jakarta.ws.rs.client.ClientRequestFilter,jakarta.ws.rs.client.ClientResponseFilter
@ConstrainedTo(CLIENT) public class HttpAuthorizationFilter extends Object implements jakarta.ws.rs.client.ClientRequestFilter, jakarta.ws.rs.client.ClientResponseFilter
AClientResponseFilterwhich repeats the request if the response from the original request has a status ofResponse.Status.UNAUTHORIZED. It uses theAuthorizationProcessor's provided to add aHttpHeaders.AUTHORIZATIONheader created from the processor.- Author:
- James R. Perkins
-
-
Constructor Summary
Constructors Constructor Description HttpAuthorizationFilter(int limit, AuthorizationProcessor... processors)Creates a new filter with a default limit for the cached size.HttpAuthorizationFilter(int limit, Collection<AuthorizationProcessor> processors)Creates a new filter.HttpAuthorizationFilter(AuthorizationProcessor... processors)Creates a new filter with a default limit for the cached size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(jakarta.ws.rs.client.ClientRequestContext requestContext)voidfilter(jakarta.ws.rs.client.ClientRequestContext requestContext, jakarta.ws.rs.client.ClientResponseContext responseContext)
-
-
-
Constructor Detail
-
HttpAuthorizationFilter
public HttpAuthorizationFilter(AuthorizationProcessor... processors)
Creates a new filter with a default limit for the cached size.- Parameters:
processors- the processors used to create the authorization header
-
HttpAuthorizationFilter
public HttpAuthorizationFilter(int limit, AuthorizationProcessor... processors)Creates a new filter with a default limit for the cached size.- Parameters:
limit- the maximum number of entries to cache for repeat requestsprocessors- the processors used to create the authorization header
-
HttpAuthorizationFilter
public HttpAuthorizationFilter(int limit, Collection<AuthorizationProcessor> processors)Creates a new filter.- Parameters:
limit- the maximum number of entries to cache for repeat requestsprocessors- the processors used to create the authorization header
-
-
Method Detail
-
filter
public void filter(jakarta.ws.rs.client.ClientRequestContext requestContext) throws IOException- Specified by:
filterin interfacejakarta.ws.rs.client.ClientRequestFilter- Throws:
IOException
-
filter
public void filter(jakarta.ws.rs.client.ClientRequestContext requestContext, jakarta.ws.rs.client.ClientResponseContext responseContext) throws IOException- Specified by:
filterin interfacejakarta.ws.rs.client.ClientResponseFilter- Throws:
IOException
-
-