WebService::Amazon::Signature::v4 - support for v4 of the Amazon signing method
version 0.002
my $req = 'GET / HTTP/1.1 ...'; my $amz = WebService::Amazon::Signature::v4->new( scope => '20110909/us-east-1/host/aws4_request', access_key => 'AKIDEXAMPLE', secret_key => 'wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY', ); $amz->parse_request($req) my $signed_req = $amz->signed_request($req);
Instantiate a signing object. Expects the following named parameters:
scope - the scope used for requests, typically something like 20130112/us-west-2/dynamodb/aws4_request
20130112/us-west-2/dynamodb/aws4_request
secret_key - your secret key
access_key - your access key
Read-only accessor for the algorithm (default is AWS4-HMAC-SHA256)
AWS4-HMAC-SHA256
Read-only accessor for the date field.
Read-only accessor for scope information - typically something like 20110909/us-east-1/host/aws4_request.
20110909/us-east-1/host/aws4_request
Readonly accessor for the access key used when signing requests.
Readonly accessor for the secret key used when signing requests.
Read-only accessor for the headers used for signing purposes (a string consisting of the lowercase headers separated by ; in lexical order)
Parses a given request. Takes a single parameter - the HTTP request as a string.
Parses information from an HTTP::Request instance.
Returns the string form of the canonical request, used as an intermediate point in generating the signature.
Returns the \n-separated string as the last step before generating the signature itself.
Calculates the signature for the current request and returns it as a string suitable for the Authorization header.
Authorization
Returns a signed version of the request.
Tom Molesworth <cpan@entitymodel.com>
Copyright Tom Molesworth 2012-2013. Licensed under the same terms as Perl itself.
To install WebService::Amazon::Signature, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Amazon::Signature
CPAN shell
perl -MCPAN -e shell install WebService::Amazon::Signature
For more information on module installation, please visit the detailed CPAN module installation guide.