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.
A processor for creating a value for the
HttpHeaders.AUTHORIZATION
header. The
createRequestHeader(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 the createRequestHeader(ClientRequestContext, List)
is invoked.- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
createRequestHeader
(jakarta.ws.rs.client.ClientRequestContext requestContext) Creates a value for theHttpHeaders.AUTHORIZATION
header.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 Details
-
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 orinvalid @link
{@link null
-
createRequestHeader
Creates a value for theHttpHeaders.AUTHORIZATION
header.- Parameters:
requestContext
- the client request context- Returns:
- the value for the
HttpHeaders.AUTHORIZATION
header orinvalid @link
{@link null
-
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
-