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 Details

    • AwsSigner

      public AwsSigner()
  • Method Details

    • 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 sign
      config - 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 chunk
      previousSignature - the signature of the previous component of the request: either the request itself for the first chunk, or the previous chunk otherwise
      config - 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 sign
      config - 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 chunk
      previousSignature - the signature of the previous component of the request: either the request itself for the first chunk, or the previous chunk otherwise
      config - 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 otherwise
      config - signing configuration
      Returns:
      future which will contain a signing result, which provides easier access to all signing-related result properties