NAME
Amazon::API::Signature4 - AWS Signature Version 4 adapter for Amazon::API
SYNOPSIS
# Used internally by Amazon::API - not normally called directly.
Amazon::API::Signature4->new(
-access_key => $key,
-secret_key => $secret,
-security_token => $token, # optional
service => 'sns',
region => 'us-east-1',
)->sign( $http_request, $region );
DESCRIPTION
Adapter between Amazon::API's existing signing interface (AWS::Signature4-compatible: takes an HTTP::Request object, signs in place, returns it) and Amazon::Signature4::Lite (which works with plain scalars and hashrefs, no LWP dependency).
Translates -access_key/-secret_key/-security_token (dash-prefix, AWS::Signature4 convention) to access_key/secret_key/session_token (plain, Amazon::Signature4::Lite convention) in new().
sign($request, $region) extracts the method, URL, headers, and body from the HTTP::Request object, calls "sign" in Amazon::Signature4::Lite, and applies the returned signed headers back onto the request object - preserving the in-place mutation behaviour that Amazon::API expects.
parse_service_url is inherited from Amazon::Signature4::Lite.