File Coverage

blib/lib/Paws/Signin.pm
Criterion Covered Total %
statement 29 32 90.6
branch n/a
condition n/a
subroutine 9 12 75.0
pod 0 6 0.0
total 38 50 76.0


line stmt bran cond sub pod time code
1             package Paws::Signin;
2 1     1   1740 use Moose;
  1     3   3  
  1         10  
  3         2102  
  3         8  
  3         22  
3 1     1   6835 use JSON::MaybeXS;
  1     3   3  
  1         74  
  3         17702  
  3         4  
  3         183  
4 1     1   6 use URI;
  1     3   2  
  1         344  
  3         745  
  3         6643  
  3         1165  
5 2     2 0 6 sub service { 'signin' }
6 0     0 0 0 sub version { '2010-05-08' }
7 0     0 0 0 sub flattened_arrays { 0 }
8             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9             has retry => (is => 'ro', isa => 'HashRef', default => sub {
10             { base => 'rand', type => 'exponential', growth_factor => 2 }
11             });
12             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13             ] });
14              
15              
16             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::NoSignature', 'Paws::Net::SigninCaller', 'Paws::Net::JsonResponse';
17            
18             has '+region_rules' => (default => sub {
19             my $regioninfo;
20             $regioninfo = [
21             {
22             uri => 'https://signin.aws.amazon.com'
23             }
24             ];
25             return $regioninfo;
26             });
27              
28 0     0 0 0 sub operations { qw/GetSigninToken Login/ }
29            
30             sub GetSigninToken {
31 1     1 0 20 my $self = shift;
32 1         10 my $call_object = $self->new_with_coercions('Paws::Signin::GetSigninToken', @_);
33 1         1241 return $self->caller->do_call($self, $call_object);
34             }
35              
36             # This method doesn't do an HTTP call. It uses prepare_request_for_call to get a requestObj
37             # that is manipulated to construct the URL in Step6 of
38             # http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
39             sub Login {
40 1     1 0 5 my $self = shift;
41 1         5 my $call_object = $self->new_with_coercions('Paws::Signin::Login', @_);
42              
43 1         974 my $params = {
44             Action => $call_object->_api_call,
45             Destination => $call_object->Destination,
46             Issuer => $call_object->Issuer,
47             SigninToken => $call_object->SigninToken
48             };
49              
50 1         22 my $url = URI->new($self->endpoint);
51 1         115 $url->path('/federation');
52 1         46 $url->query_form($params);
53              
54 1         205 return $self->response_to_object($call_object, 200, encode_json({ URL => $url->as_string }), {});
55             }
56              
57             1;
58              
59             ### main pod documentation begin ###
60              
61             =head1 NAME
62              
63             Paws::Signin - Perl Interface to AWS Console Signin service
64              
65             =head1 SYNOPSIS
66              
67             use Paws;
68              
69             my $obj = Paws->service('...');
70             my $res = $obj->Method(Arg1 => $val1, Arg2 => $val2);
71              
72             =cut