blib/lib/Paws/SSOOidc/CreateToken.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 28 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SSOOidc::CreateToken;
3 use Moose;
4 has ClientId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientId', required => 1);
5 has ClientSecret => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientSecret', required => 1);
6 has Code => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'code');
7 has DeviceCode => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'deviceCode', required => 1);
8 has GrantType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'grantType', required => 1);
9 has RedirectUri => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'redirectUri');
10 has RefreshToken => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'refreshToken');
11 has Scope => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'scope');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateToken');
16 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/token');
17 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SSOOidc::CreateTokenResponse');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::SSOOidc::CreateToken - Arguments for method CreateToken on L<Paws::SSOOidc>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method CreateToken on the
30 L<AWS SSO OIDC|Paws::SSOOidc> service. Use the attributes of this class
31 as arguments to method CreateToken.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateToken.
34  
35 =head1 SYNOPSIS
36  
37 my $oidc = Paws->service('SSOOidc');
38 my $CreateTokenResponse = $oidc->CreateToken(
39 ClientId => 'MyClientId',
40 ClientSecret => 'MyClientSecret',
41 DeviceCode => 'MyDeviceCode',
42 GrantType => 'MyGrantType',
43 Code => 'MyAuthCode', # OPTIONAL
44 RedirectUri => 'MyURI', # OPTIONAL
45 RefreshToken => 'MyRefreshToken', # OPTIONAL
46 Scope => [ 'MyScope', ... ], # OPTIONAL
47 );
48  
49 # Results:
50 my $AccessToken = $CreateTokenResponse->AccessToken;
51 my $ExpiresIn = $CreateTokenResponse->ExpiresIn;
52 my $IdToken = $CreateTokenResponse->IdToken;
53 my $RefreshToken = $CreateTokenResponse->RefreshToken;
54 my $TokenType = $CreateTokenResponse->TokenType;
55  
56 # Returns a L<Paws::SSOOidc::CreateTokenResponse> object.
57  
58 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
59 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/oidc/CreateToken>
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 B<REQUIRED> ClientId => Str
65  
66 The unique identifier string for each client. This value should come
67 from the persisted result of the RegisterClient API.
68  
69  
70  
71 =head2 B<REQUIRED> ClientSecret => Str
72  
73 A secret string generated for the client. This value should come from
74 the persisted result of the RegisterClient API.
75  
76  
77  
78 =head2 Code => Str
79  
80 The authorization code received from the authorization service. This
81 parameter is required to perform an authorization grant request to get
82 access to a token.
83  
84  
85  
86 =head2 B<REQUIRED> DeviceCode => Str
87  
88 Used only when calling this API for the device code grant type. This
89 short-term code is used to identify this authentication attempt. This
90 should come from an in-memory reference to the result of the
91 StartDeviceAuthorization API.
92  
93  
94  
95 =head2 B<REQUIRED> GrantType => Str
96  
97 Supports grant types for authorization code, refresh token, and device
98 code request.
99  
100  
101  
102 =head2 RedirectUri => Str
103  
104 The location of the application that will receive the authorization
105 code. Users authorize the service to send the request to this location.
106  
107  
108  
109 =head2 RefreshToken => Str
110  
111 The token used to obtain an access token in the event that the access
112 token is invalid or expired. This token is not issued by the service.
113  
114  
115  
116 =head2 Scope => ArrayRef[Str|Undef]
117  
118 The list of scopes that is defined by the client. Upon authorization,
119 this list is used to restrict permissions when granting an access
120 token.
121  
122  
123  
124  
125 =head1 SEE ALSO
126  
127 This class forms part of L<Paws>, documenting arguments for method CreateToken in L<Paws::SSOOidc>
128  
129 =head1 BUGS and CONTRIBUTIONS
130  
131 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
132  
133 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
134  
135 =cut
136