AWS-S3
view release on metacpan or search on metacpan
lib/AWS/S3/Signer/V4.pm view on Meta::CPAN
my $scope = $self->_scope($request);
$uri->query_param( 'X-Amz-Algorithm' => $self->_algorithm );
$uri->query_param( 'X-Amz-Credential' => $self->access_key . '/' . $scope );
$uri->query_param( 'X-Amz-Date' => $self->_datetime($request) );
$uri->query_param( 'X-Amz-Expires' => $expires ) if $expires;
$uri->query_param( 'X-Amz-SignedHeaders' => 'host' );
# If there was a security token passed, we need to supply it as part of the authorization
# because AWS requires it to validate IAM Role temporary credentials.
if ( defined( $self->{security_token} ) ) {
$uri->query_param( 'X-Amz-Security-Token' => $self->{security_token} );
}
# Since we're providing auth via query parameters, we need to include UNSIGNED-PAYLOAD
# http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
# it seems to only be needed for S3.
if ( $scope =~ /\/s3\/aws4_request$/ ) {
( run in 0.637 second using v1.01-cache-2.11-cpan-a5abf4f5562 )