Generate AWS S3 Signature. see: http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
Since Version |
0.0.1 |
Scope |
accepts: |
public |
responds as: |
~crosstalk |
All parameters are optional, unless otherwise indicated.
awsAccessKeyId |
AKIAIOSFODNN7EXAMPLE |
required AWS Access Key Id |
bucketName |
johnsmith-bucket |
required Bucket name |
contentMD5 |
4gJE4saaMU4BqNR0kLY+lw== |
Content-MD5 optional param (could be included in headers instead) |
contentType |
application/json |
Content-Type optional param (could be included in headers instead) |
date |
Tue, 27 Mar 2007 21:06:08 +0000 |
Date optional param (could be included in headers instead) |
headers |
{ 'x-amz-meta-username': 'bob' } |
Headers for the request to be signed |
httpVerb |
PUT |
HTTP verb for the request |
objectName |
photos/puppy.jpg |
required Object name (can be "" ) |
secretAccessKey |
wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY |
required AWS Secret Access Key |
subResources |
[ 'acl' , 'location=blah' ] |
sub-resources included in request |
authorization |
AWS AKIAIOSFODNN7EXAMPLE:MQQiQPfT6zpbgaTQTFmCb6b67etK/Roeo/r3ze/32kM= |
The Authorization header field value |
date |
Thu, 14 Aug 2008 17:08:48 GMT |
The Date or x-amz-date header field value |
signature |
MQQiQPfT6zpbgaTQTFmCb6b67etK/Roeo/r3ze/32kM= |
Calculated signature value |
message |
Missing awsAccessKeyId |
Error message |
crosstalk.emit(
'~crosstalk.api.aws.signature.s3',
{
awsAccessKeyId : "AKIAIOSFODNN7EXAMPLE",
bucketName : "johnsmith",
headers : {
Date : "Tue, 27 Mar 2007 19:36:42 +0000"
},
objectName : "photos/puppy.jpg",
secretAccessKey : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
},
'~crosstalk',
function ( error, response ) { /* ... */ }
);
{
"authorization":"AWS AKIAIOSFODNN7EXAMPLE:qkbS/v/Og0wkdyysr6NEj9gGktPMapsTn19e5nGgcE8=",
"date":"Tue, 27 Mar 2007 19:36:42 +0000",
"signature":"qkbS/v/Og0wkdyysr6NEj9gGktPMapsTn19e5nGgcE8="
}
{
"message": "Missing awsAccessKeyId"
}