Interface HttpSigner<IdentityT extends Identity>
- Type Parameters:
IdentityT
- The type of the identity.
- All Known Subinterfaces:
AwsV4aHttpSigner
,AwsV4FamilyHttpSigner<T>
,AwsV4HttpSigner
,BearerHttpSigner
- All Known Implementing Classes:
DefaultAwsCrtV4aHttpSigner
,DefaultAwsV4HttpSigner
,DefaultBearerHttpSigner
,DefaultS3ExpressHttpSigner
public interface HttpSigner<IdentityT extends Identity>
Interface for the process of modifying a request destined for a service so that the service can authenticate the SDK
customer’s identity.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SignerProperty
<Clock> AClock
to be used to derive the signing time. -
Method Summary
Modifier and TypeMethodDescriptiondefault SignedRequest
sign
(Consumer<SignRequest.Builder<IdentityT>> consumer) Method that takes in inputs to sign a request with sync payload and returns a signed version of the request.sign
(SignRequest<? extends IdentityT> request) Method that takes in inputs to sign a request with sync payload and returns a signed version of the request.default CompletableFuture
<AsyncSignedRequest> signAsync
(Consumer<AsyncSignRequest.Builder<IdentityT>> consumer) Method that takes in inputs to sign a request with async payload and returns a future containing the signed version of the request.signAsync
(AsyncSignRequest<? extends IdentityT> request) Method that takes in inputs to sign a request with async payload and returns a future containing the signed version of the request.
-
Field Details
-
SIGNING_CLOCK
AClock
to be used to derive the signing time. This property defaults to the system clock.Note, signing time may not be relevant to some signers.
-
-
Method Details
-
sign
Method that takes in inputs to sign a request with sync payload and returns a signed version of the request.- Parameters:
request
- The inputs to sign a request.- Returns:
- A signed version of the request.
-
sign
Method that takes in inputs to sign a request with sync payload and returns a signed version of the request.Similar to
sign(SignRequest)
, but takes a lambda to configure a newSignRequest.Builder
. This removes the need to callinvalid reference
SignRequest#builder(IdentityT)
SdkBuilder.build()
.- Parameters:
consumer
- AConsumer
to which an emptySignRequest.Builder
will be given.- Returns:
- A signed version of the request.
-
signAsync
Method that takes in inputs to sign a request with async payload and returns a future containing the signed version of the request.- Parameters:
request
- The inputs to sign a request.- Returns:
- A future containing the signed version of the request.
-
signAsync
default CompletableFuture<AsyncSignedRequest> signAsync(Consumer<AsyncSignRequest.Builder<IdentityT>> consumer) Method that takes in inputs to sign a request with async payload and returns a future containing the signed version of the request.Similar to
signAsync(AsyncSignRequest)
, but takes a lambda to configure a newAsyncSignRequest.Builder
. This removes the need to callinvalid reference
AsyncSignRequest#builder(IdentityT)
SdkBuilder.build()
.- Parameters:
consumer
- AConsumer
to which an emptyBaseSignRequest.Builder
will be given.- Returns:
- A future containing the signed version of the request.
-