AWS-Signature-V4

 view release on metacpan or  search on metacpan

lib/AWS/Signature/V4/Credentials.pod  view on Meta::CPAN

=pod

=for vim
   vim: tw=72 ts=3 sts=3 sw=3 et ai :

=encoding utf8

=head1 NAME

AWS::Signature::V4::Credentials - The credentials-based variant of AWS Signature V4


=head1 VERSION

This module is part of the L<AWS::Signature::V4> distribution and shares
its version.


=head1 SYNOPSIS

   # you do not create it: AWS::Signature::V4 does, from "credentials"
   use AWS::Signature::V4;

   my $s = AWS::Signature::V4->new(
      service => 'iam', region => 'us-east-1',
      credentials => {
         access_key_id     => $id,
         secret_access_key => $secret,
         session_token     => $token,    # optional
      },
   );


=head1 DESCRIPTION

This class implements the traditional variant of the algorithm
(C<AWS4-HMAC-SHA256>), where the signature is an HMAC computed with a key
derived from the secret access key.

B<You are not supposed to use this module directly.>
L<AWS::Signature::V4> creates an object when it is given the
C<credentials> option, using the same keys, and calls the methods below.
The class is documented for those who work on the distribution, or want
to know how the two variants are kept apart, not as a public interface.

The constructor complains with an L<Ouch> exception (code C<400>) if the
access key or the secret are missing or empty; the session token is
optional, and an empty one is like a missing one.


=head1 THE INTERFACE OF A VARIANT

L<AWS::Signature::V4> talks to the variant in use, this class or its
sibling, through the same few methods, so that it does not need to know
which one it is dealing with. The scope is what appears in the
C<Credential> and in the string to sign, like
C<20150830/us-east-1/iam/aws4_request>.

=head1 INTERFACE

=head2 algorithm

   my $name = $variant->algorithm;    # AWS4-HMAC-SHA256

=head2 credential_id



( run in 0.795 second using v1.01-cache-2.11-cpan-39bc3f1cbff )