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
A
ClientResponseFilter which repeats the request if the response from the original request has a status of
Response.Status.UNAUTHORIZED. It uses the AuthorizationProcessor's provided to add a
HttpHeaders.AUTHORIZATION header created from the processor.- Author:
- James R. Perkins
-
Constructor Summary
ConstructorsConstructorDescriptionHttpAuthorizationFilter(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
-
Constructor Details
-
HttpAuthorizationFilter
Creates a new filter with a default limit for the cached size.- Parameters:
processors- the processors used to create the authorization header
-
HttpAuthorizationFilter
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
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 Details
-
filter
- 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
-