PresignHTTPRequestMiddleware provides the Finalize middleware for creating a
presigned URL for an HTTP request.
Will short circuit the middleware stack and not forward onto the next
Finalize handler.
credentialsProviderCredentialsProviderlogSigningboolpresignerHTTPPresigner
HandleFinalize will take the provided input and create a presigned url for
the http request using the SigV4 presign authentication scheme.
ID provides the middleware ID.
*PresignHTTPRequestMiddleware : github.com/aws/smithy-go/middleware.FinalizeMiddleware
*PresignHTTPRequestMiddleware : github.com/aws/smithy-go/middleware.ider
func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware
Signer is a SigV4a HTTP signing implementation
optionsSignerOptions
PresignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and presigns using SigV4a
Returns the presigned URL along with the headers that were signed with the request.
PresignHTTP will not set the expires time of the presigned request
automatically. To specify the expire duration for a request add the
"X-Amz-Expires" query parameter on the request with the value as the
duration in seconds the presigned URL should be considered valid for. This
parameter is not used by all AWS services, and is most notable used by
Amazon S3 APIs.
SignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and signs using SigV4a.
The passed in request will be modified in place.
*Signer : HTTPPresigner
*Signer : HTTPSigner
*Signer : github.com/aws/aws-sdk-go-v2/service/s3.httpPresignerV4a
*Signer : github.com/aws/aws-sdk-go-v2/service/s3.httpSignerV4a
func NewSigner(optFns ...func(*SignerOptions)) *Signer
func github.com/aws/aws-sdk-go-v2/service/s3.newDefaultV4aSigner(o s3.Options) *Signer
SignerOptions is the SigV4a signing options for constructing a Signer.
Disables the Signer's moving HTTP header key/value pairs from the HTTP
request header to the request's query string. This is most commonly used
with pre-signed requests preventing headers from being added to the
request's query string.
Disables the automatic escaping of the URI path of the request for the
siganture's canonical string's path. For services that do not need additional
escaping then use this to disable the signer escaping the path.
S3 is an example of a service that does not need additional escaping.
http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
LogSigningboolLoggerlogging.Logger
func logHTTPSigningInfo(ctx context.Context, options SignerOptions, r signedRequest)
Package-Level Functions (total 11, in which 4 are exported)
NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware
initialized with the presigner.
NewSigner constructs a SigV4a Signer.
NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given SignHTTPRequestMiddlewareOptions.
RegisterSigningMiddleware registers the SigV4a signing middleware to the stack. If a signing middleware is already
present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the
finalize step.