Class AwsSigner
- java.lang.Object
-
- software.amazon.awssdk.crt.auth.signing.AwsSigner
-
public class AwsSigner extends Object
Static class for a variety of AWS signing APIs.
-
-
Constructor Summary
Constructors Constructor Description AwsSigner()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompletableFuture<AwsSigningResult>
sign(List<HttpHeader> headers, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configurationstatic CompletableFuture<AwsSigningResult>
sign(HttpRequestBodyStream chunkBody, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configurationstatic CompletableFuture<AwsSigningResult>
sign(HttpRequest request, AwsSigningConfig config)
Signs an http request according to the supplied signing configurationstatic CompletableFuture<byte[]>
signChunk(HttpRequestBodyStream chunkBody, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configurationstatic CompletableFuture<HttpRequest>
signRequest(HttpRequest request, AwsSigningConfig config)
Signs an http request according to the supplied signing configuration
-
-
-
Method Detail
-
signRequest
public static CompletableFuture<HttpRequest> signRequest(HttpRequest request, AwsSigningConfig config)
Signs an http request according to the supplied signing configuration- Parameters:
request
- http request to signconfig
- signing configuration- Returns:
- future which will contain the signed request
-
signChunk
public static CompletableFuture<byte[]> signChunk(HttpRequestBodyStream chunkBody, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configuration- Parameters:
chunkBody
- stream of bytes that make up the chunkpreviousSignature
- the signature of the previous component of the request: either the request itself for the first chunk, or the previous chunk otherwiseconfig
- signing configuration- Returns:
- future which will contain the signature of the chunk. The signature *MUST* be written directly into the chunk metadata.
-
sign
public static CompletableFuture<AwsSigningResult> sign(HttpRequest request, AwsSigningConfig config)
Signs an http request according to the supplied signing configuration- Parameters:
request
- http request to signconfig
- signing configuration- Returns:
- future which will contain a signing result, which provides easier access to all signing-related result properties
-
sign
public static CompletableFuture<AwsSigningResult> sign(HttpRequestBodyStream chunkBody, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configuration- Parameters:
chunkBody
- stream of bytes that make up the chunkpreviousSignature
- the signature of the previous component of the request: either the request itself for the first chunk, or the previous chunk otherwiseconfig
- signing configuration- Returns:
- future which will contain a signing result, which provides easier access to all signing-related result properties
-
sign
public static CompletableFuture<AwsSigningResult> sign(List<HttpHeader> headers, byte[] previousSignature, AwsSigningConfig config)
Signs a body chunk according to the supplied signing configuration- Parameters:
headers
- list of headers to be sent in the trailer.previousSignature
- the signature of the previous component of the request: either the request itself for the first chunk, or the previous chunk otherwiseconfig
- signing configuration- Returns:
- future which will contain a signing result, which provides easier access to all signing-related result properties
-
-