public class DefaultRequestSignerFactory extends Object implements RequestSignerFactory
Factory class to create RequestSigner instances. Takes care of setting up the appropriate
suppliers based on the cacheability of the credentials (indicated by AuthCachingPolicy
.
By default, all credentials are cacheable.
This factory supports authentication providers that inherit from BasicAuthenticationDetailsProvider
.
Constructor and Description |
---|
DefaultRequestSignerFactory(SigningStrategy signingStrategy) |
Modifier and Type | Method and Description |
---|---|
static Map<SigningStrategy,RequestSignerFactory> |
createDefaultRequestSignerFactories()
Create the default request signer factories.
|
protected Supplier<String> |
createKeyIdSupplier(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
AuthCachingPolicy policy) |
static KeySupplier<RSAPrivateKey> |
createKeySupplier(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
AuthCachingPolicy policy) |
RequestSigner |
createRequestSigner(Service service,
AbstractAuthenticationDetailsProvider abstractAuthProvider)
Creates a new RequestSigner instance from the given provider and type of service.
|
static AuthCachingPolicy |
getAuthCachingPolicy(BasicAuthenticationDetailsProvider authenticationDetailsProvider) |
@ConstructorProperties(value="signingStrategy") public DefaultRequestSignerFactory(SigningStrategy signingStrategy)
public RequestSigner createRequestSigner(Service service, AbstractAuthenticationDetailsProvider abstractAuthProvider)
Creates a new RequestSigner instance from the given provider and type of service.
Note, service parameter is not used by this factory.
createRequestSigner
in interface RequestSignerFactory
service
- The service type.abstractAuthProvider
- The authentication details provider.protected Supplier<String> createKeyIdSupplier(BasicAuthenticationDetailsProvider authenticationDetailsProvider, AuthCachingPolicy policy)
public static KeySupplier<RSAPrivateKey> createKeySupplier(BasicAuthenticationDetailsProvider authenticationDetailsProvider, AuthCachingPolicy policy)
public static AuthCachingPolicy getAuthCachingPolicy(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
public static Map<SigningStrategy,RequestSignerFactory> createDefaultRequestSignerFactories()
Create the default request signer factories.
Copyright © 2016–2024. All rights reserved.