v4

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package v4 exposes common APIs for AWS Signature Version 4.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnsignedPayload

func UnsignedPayload() []byte

UnsignedPayload provides the sentinel value for a payload hash to indicate that a request's payload is unsigned.

Types

type SignedHeaderRules

type SignedHeaderRules interface {
	IsSigned(string) bool
}

SignedHeaderRules determines whether a request header should be included in the calculated signature.

By convention, ShouldSign is invoked with lowercase values.

type SignerOption

type SignerOption func(*SignerOptions)

SignerOption applies configuration to a signer.

type SignerOptions

type SignerOptions struct {
	// Rules to determine what headers are signed.
	//
	// By default, the signer will only include the minimum required headers:
	//   - Host
	//   - X-Amz-*
	HeaderRules SignedHeaderRules

	// Setting this flag will instead cause the signer to use the
	// UNSIGNED-PAYLOAD sentinel if a hash is not explicitly provided.
	DisableImplicitPayloadHashing bool

	// Disables the automatic escaping of the URI path of the request for the
	// siganture's canonical string's path.
	//
	// Amazon S3 is an example of a service that requires this setting.
	DisableDoublePathEscape bool

	// Adds the X-Amz-Content-Sha256 header to signed requests.
	//
	// Amazon S3 is an example of a service that requires this setting.
	AddPayloadHashHeader bool
}

SignerOptions configures SigV4.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL