Skip Menu |

This queue is for tickets about the AWS-Signature4 CPAN distribution.

Report information
The Basics
Id: 123074
Status: new
Priority: 0/
Queue: AWS-Signature4

People
Owner: Nobody in particular
Requestors: unobe [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.02
Fixed in: (no value)



Subject: Allow integration with AGCOD API
Thank you for writing this module, and the other modules you have written over the last couple of decades. I have found them very useful. For this module, I am using Amazon Gift Code On Demand API and had to modify the _scope routine to sign the requests correctly for the sandbox and production endpoints (agcod-v2-gamma.amazon.com and agcode-v2.amazon.com, respectively). Attached is the patch against the latest version (v1.02). Regards, Romano
Subject: agcod.patch
diff --git a/lib/perl5/site_perl/5.22.1/AWS/Signature4.pm b/lib/perl5/site_perl/5.22.1/AWS/Signature4.pm index 961a817..1fd51d1 100644 --- a/lib/perl5/site_perl/5.22.1/AWS/Signature4.pm +++ b/lib/perl5/site_perl/5.22.1/AWS/Signature4.pm @@ -243,6 +243,11 @@ sub _scope { } elsif ($host =~ /^([\w-]+)\.amazonaws\.com/) { $service = $1; $region = 'us-east-1'; + + # Permit use of AGCOD API + } elsif ($host =~ /^agcod-([\w-]+)\.amazon\.com/) { + $service = 'AGCODService'; + $region = 'us-east-1'; } $service ||= 's3'; $region ||= 'us-east-1'; # default