| 1 | package Net::Amazon::S3::Signature; | ||||||||||
| 2 | # ABSTRACT: S3 Signature implementation base class | ||||||||||
| 3 | 99 | $Net::Amazon::S3::Signature::VERSION = '0.992'; | |||||||||
| 4 | 99 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 99 | has http_request => ( | |||||||||
| 7 | is => 'ro', | ||||||||||
| 8 | isa => 'Net::Amazon::S3::HTTPRequest', | ||||||||||
| 9 | ); | ||||||||||
| 10 | |||||||||||
| 11 | 210 | ▶ | sub _append_authorization_headers { | ||||||||
|
Subroutine
_append_authorization_headers: called CC=2 SCAR=6.9
| |||||||||||
| 12 | 210 | my ($self, $request) = @_; | |||||||||
| 13 | |||||||||||
| 14 | 210 | my %headers = $self->http_request->s3->authorization_context->authorization_headers; | |||||||||
| 15 | |||||||||||
| 16 | 210 | ▶ | while (my ($key, $value) = each %headers) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 1 | $self->_populate_default_header ($request, $key => $value); | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 210 | (); | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 6 | ▶ | sub _append_authorization_query_params { | ||||||||
|
Subroutine
_append_authorization_query_params: called CC=2 SCAR=7.4
| |||||||||||
| 24 | 6 | my ($self, $request) = @_; | |||||||||
| 25 | |||||||||||
| 26 | 6 | my %headers = $self->http_request->s3->authorization_context->authorization_headers; | |||||||||
| 27 | |||||||||||
| 28 | 6 | ▶ | while (my ($key, $value) = each %headers) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | $self->_populate_default_query_param ($request, $key => $value); | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 6 | (); | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 1 | ▶ | sub _populate_default_header { | ||||||||
|
Subroutine
_populate_default_header: called CC=3 SCAR=11.3
| |||||||||||
| 36 | 1 | my ($self, $request, $key, $value) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 1 | ▶ | return unless defined $value; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 1 | ▶ | return if defined $request->header ($key); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | |||||||||||
| 41 | 1 | $request->header ($key => $value); | |||||||||
| 42 | |||||||||||
| 43 | 1 | (); | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 0 | ▶ | sub _populate_default_query_param { | ||||||||
|
Subroutine
_populate_default_query_param: not called CC=3 SCAR=24.8
| |||||||||||
| 47 | 0 | my ($self, $request, $key, $value) = @_; | |||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | return unless defined $value; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 50 | 0 | ▶ | return if defined $request->uri->query_param ($key); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | |||||||||||
| 52 | 0 | $request->uri->query_param ($key => $value); | |||||||||
| 53 | |||||||||||
| 54 | 0 | (); | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | 0 | ▶ | sub sign_request { | ||||||||
|
Subroutine
sign_request: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 58 | 0 | my ($self, $request); | |||||||||
| 59 | |||||||||||
| 60 | 0 | return; | |||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | 0 | ▶ | sub sign_uri { | ||||||||
|
Subroutine
sign_uri: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 64 | 0 | my ($self, $uri, $expires_at); | |||||||||
| 65 | |||||||||||
| 66 | 0 | return; | |||||||||
| 67 | } | ||||||||||
| 68 | |||||||||||
| 69 | 99 | 1; | |||||||||
| 70 | |||||||||||
| 71 | __END__ | ||||||||||