Interface AuthorizationProcessor
-
- All Known Implementing Classes:
BasicAuthorizationProcessor
,DigestAuthorizationProcessor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AuthorizationProcessor
A processor for creating a value for theHttpHeaders.AUTHORIZATION
header. ThecreateRequestHeader(ClientRequestContext)
is first invoked to see if we can create a header without first making the request. If not, e.g.null
is returned, then thecreateRequestHeader(ClientRequestContext, List)
is invoked.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
createRequestHeader(jakarta.ws.rs.client.ClientRequestContext requestContext)
Creates a value for theHttpHeaders.AUTHORIZATION
header.String
createRequestHeader(jakarta.ws.rs.client.ClientRequestContext requestContext, List<String> authenticateHeader)
Creates a value for theHttpHeaders.AUTHORIZATION
header.default void
reset(jakarta.ws.rs.client.ClientRequestContext requestContext)
Processors may require a reset if authorization fails.
-
-
-
Method Detail
-
createRequestHeader
String createRequestHeader(jakarta.ws.rs.client.ClientRequestContext requestContext, List<String> authenticateHeader)
Creates a value for theHttpHeaders.AUTHORIZATION
header.- Parameters:
requestContext
- the client request contextauthenticateHeader
- theHttpHeaders.WWW_AUTHENTICATE
value- Returns:
- the value for the
HttpHeaders.AUTHORIZATION
header or {@link null} if one could not be created by this processor
-
createRequestHeader
default String createRequestHeader(jakarta.ws.rs.client.ClientRequestContext requestContext)
Creates a value for theHttpHeaders.AUTHORIZATION
header.- Parameters:
requestContext
- the client request context- Returns:
- the value for the
HttpHeaders.AUTHORIZATION
header or {@link null} if one could not be created by this processor
-
reset
default void reset(jakarta.ws.rs.client.ClientRequestContext requestContext)
Processors may require a reset if authorization fails. By default, this does nothing.- Parameters:
requestContext
- the client request context
-
-