line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
# OxdRegister.pm, a number as an object |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Gluu-oxd-library |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# An open source application library for PHP |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# This content is released under the MIT License (MIT) |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Copyright (c) 2015, Gluu inc, USA, Austin |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy |
14
|
|
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal |
15
|
|
|
|
|
|
|
# in the Software without restriction, including without limitation the rights |
16
|
|
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
17
|
|
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is |
18
|
|
|
|
|
|
|
# furnished to do so, subject to the following conditions: |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in |
21
|
|
|
|
|
|
|
# all copies or substantial portions of the Software. |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
24
|
|
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
25
|
|
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
26
|
|
|
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
27
|
|
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
28
|
|
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
29
|
|
|
|
|
|
|
# THE SOFTWARE. |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
# @package Gluu-oxd-library |
32
|
|
|
|
|
|
|
# @version 2.4.4 |
33
|
|
|
|
|
|
|
# @author Ourdesignz |
34
|
|
|
|
|
|
|
# @author gaurav.chhabra6785@gmail.com |
35
|
|
|
|
|
|
|
# @copyright Copyright (c) 2015, Gluu inc federation (https://gluu.org/) |
36
|
|
|
|
|
|
|
# @license http://opensource.org/licenses/MIT MIT License |
37
|
|
|
|
|
|
|
# @link https://gluu.org/ |
38
|
|
|
|
|
|
|
# @since Version 2.4.4 |
39
|
|
|
|
|
|
|
# @filesource |
40
|
|
|
|
|
|
|
#/ |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
1
|
|
617
|
use JSON::PP; |
|
1
|
|
|
|
|
11391
|
|
|
1
|
|
|
|
|
83
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
package OxdRegister; # This is the "Class" |
45
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
44
|
|
46
|
|
|
|
|
|
|
$VERSION = '0.01'; |
47
|
|
|
|
|
|
|
|
48
|
1
|
|
|
1
|
|
389
|
use OxdPackages::OxdClient; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
use base qw(OxdClient Class::Accessor); |
50
|
|
|
|
|
|
|
#use base 'OxdClient'; |
51
|
|
|
|
|
|
|
use strict; |
52
|
|
|
|
|
|
|
our @ISA = qw(OxdClient); # inherits from OxdClient |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub new { |
55
|
|
|
|
|
|
|
my $class = shift; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $self = { |
58
|
|
|
|
|
|
|
#_firstName => shift, |
59
|
|
|
|
|
|
|
#_lastName => shift, |
60
|
|
|
|
|
|
|
#_ssn => shift, |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# @var string _request_op_host Gluu server url |
63
|
|
|
|
|
|
|
_request_op_host => shift, |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# @var array _request_acr_values Gluu login acr type, can be basic, duo, u2f, gplus and etc. |
66
|
|
|
|
|
|
|
_request_acr_values => [], |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# @var string _request_authorization_redirect_uri Site authorization redirect uri |
69
|
|
|
|
|
|
|
_request_authorization_redirect_uri => shift, |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# @var string _request_post_logout_redirect_uri Site logout redirect uri |
72
|
|
|
|
|
|
|
_request_post_logout_redirect_uri => shift, |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# @var array _request_contacts |
75
|
|
|
|
|
|
|
_request_contacts => shift, |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# @var array _request_grant_types OpenID Token Request type |
78
|
|
|
|
|
|
|
_request_grant_types => [], |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
#@var array _request_response_types OpenID Authentication response types |
81
|
|
|
|
|
|
|
_request_response_types => [], |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# @var array _request_scope For getting needed scopes from gluu-server |
84
|
|
|
|
|
|
|
_request_scope => [], |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
# @var string _request_application_type web or mobile |
87
|
|
|
|
|
|
|
_request_application_type => shift, |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
# @var string _request_client_id OpenID provider client id |
90
|
|
|
|
|
|
|
_request_client_id => shift, |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
# @var string _request_client_name OpenID provider client name |
93
|
|
|
|
|
|
|
_request_client_name => shift, |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# @var string _request_client_secret OpenID provider client secret |
96
|
|
|
|
|
|
|
_request_client_secret => shift, |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
# @var string _request_client_jwks_uri |
100
|
|
|
|
|
|
|
_request_client_jwks_uri => shift, |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# @var string _request_client_token_endpoint_auth_method |
103
|
|
|
|
|
|
|
_request_client_token_endpoint_auth_method => shift, |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# @var array _request_client_sector_identifier_uri |
106
|
|
|
|
|
|
|
_request_client_sector_identifier_uri => shift, |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# @var array _request_client_request_uris |
109
|
|
|
|
|
|
|
_request_client_request_uris => shift, |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
# @var array _request_client_logout_uris |
112
|
|
|
|
|
|
|
_request_client_logout_uris => shift, |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# @var array _request_ui_locales |
115
|
|
|
|
|
|
|
_request_ui_locales => shift, |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
# @var array _request_claims_locales |
118
|
|
|
|
|
|
|
_request_claims_locales => shift, |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# Response parameter from oxd-server |
121
|
|
|
|
|
|
|
# It is basic parameter for other protocols |
122
|
|
|
|
|
|
|
# |
123
|
|
|
|
|
|
|
# @var string _response_oxd_id |
124
|
|
|
|
|
|
|
_response_oxd_id => shift, |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# Response parameter from oxd-server |
127
|
|
|
|
|
|
|
# |
128
|
|
|
|
|
|
|
# @var string _response_op_host |
129
|
|
|
|
|
|
|
_response_op_host => shift, |
130
|
|
|
|
|
|
|
}; |
131
|
|
|
|
|
|
|
# Print all the values just for clarification. |
132
|
|
|
|
|
|
|
#print "First Name is $self->{_firstName}\n"; |
133
|
|
|
|
|
|
|
#print "Last Name is $self->{_lastName}\n"; |
134
|
|
|
|
|
|
|
#print "URl is $self->{_request_authorization_redirect_uri}\n"; |
135
|
|
|
|
|
|
|
#print " "; |
136
|
|
|
|
|
|
|
bless $self, $class; |
137
|
|
|
|
|
|
|
return $self; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
sub _initialize {} |
140
|
|
|
|
|
|
|
# @return string |
141
|
|
|
|
|
|
|
sub getRequestClientName{ |
142
|
|
|
|
|
|
|
my( $self ) = @_; |
143
|
|
|
|
|
|
|
return $self->{_request_client_name}; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
# @param string $request_client_name |
147
|
|
|
|
|
|
|
sub setRequestClientName{ |
148
|
|
|
|
|
|
|
my ( $self, $request_client_name ) = @_; |
149
|
|
|
|
|
|
|
$self->{_request_client_name} = $request_client_name if defined($request_client_name); |
150
|
|
|
|
|
|
|
return $self->{_request_client_name}; |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
# @return string |
154
|
|
|
|
|
|
|
sub getRequestClientSecret{ |
155
|
|
|
|
|
|
|
my( $self ) = @_; |
156
|
|
|
|
|
|
|
return $self->{_request_client_secret}; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
# @param string $request_client_secret |
160
|
|
|
|
|
|
|
sub setRequestClientSecret{ |
161
|
|
|
|
|
|
|
my ( $self, $request_client_secret ) = @_; |
162
|
|
|
|
|
|
|
$self->{_request_client_secret} = $request_client_secret if defined($request_client_secret); |
163
|
|
|
|
|
|
|
return $self->{_request_client_secret}; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# @return string |
167
|
|
|
|
|
|
|
sub getRequestClientId{ |
168
|
|
|
|
|
|
|
my( $self ) = @_; |
169
|
|
|
|
|
|
|
return $self->{_request_client_id}; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
# @param string $request_client_id |
173
|
|
|
|
|
|
|
sub setRequestClientId{ |
174
|
|
|
|
|
|
|
my ( $self, $request_client_id ) = @_; |
175
|
|
|
|
|
|
|
$self->{_request_client_id} = $request_client_id if defined($request_client_id); |
176
|
|
|
|
|
|
|
return $self->{_request_client_id}; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
# @param string $request_op_host |
180
|
|
|
|
|
|
|
# @return void |
181
|
|
|
|
|
|
|
sub setRequestOpHost { |
182
|
|
|
|
|
|
|
my ( $self, $request_op_host ) = @_; |
183
|
|
|
|
|
|
|
$self->{_request_op_host} = $request_op_host if defined($request_op_host); |
184
|
|
|
|
|
|
|
return $self->{_request_op_host}; |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
# @return string |
188
|
|
|
|
|
|
|
sub getRequestOpHost { |
189
|
|
|
|
|
|
|
my( $self ) = @_; |
190
|
|
|
|
|
|
|
return $self->{_request_op_host}; |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# @return array |
194
|
|
|
|
|
|
|
sub getRequestClientLogoutUris{ |
195
|
|
|
|
|
|
|
my( $self ) = @_; |
196
|
|
|
|
|
|
|
return $self->{_request_client_logout_uris}; |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
# @param array $request_client_logout_uris |
200
|
|
|
|
|
|
|
# @return void |
201
|
|
|
|
|
|
|
sub setRequestClientLogoutUris{ |
202
|
|
|
|
|
|
|
my ( $self, $request_client_logout_uris ) = @_; |
203
|
|
|
|
|
|
|
$self->{_request_client_logout_uris} = $request_client_logout_uris if defined($request_client_logout_uris); |
204
|
|
|
|
|
|
|
return $self->{_request_client_logout_uris}; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
# @return array |
208
|
|
|
|
|
|
|
sub getRequestResponseTypes{ |
209
|
|
|
|
|
|
|
my( $self ) = @_; |
210
|
|
|
|
|
|
|
return $self->{_request_response_types}; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
# @param array $request_response_types |
214
|
|
|
|
|
|
|
# @return void |
215
|
|
|
|
|
|
|
sub setRequestResponseTypes{ |
216
|
|
|
|
|
|
|
my ( $self, $request_response_types ) = @_; |
217
|
|
|
|
|
|
|
$self->{_request_response_types} = $request_response_types if defined($request_response_types); |
218
|
|
|
|
|
|
|
return $self->{_request_response_types}; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
# @return array |
222
|
|
|
|
|
|
|
sub getRequestGrantTypes{ |
223
|
|
|
|
|
|
|
my( $self ) = @_; |
224
|
|
|
|
|
|
|
return $self->{_request_grant_types}; |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
# @param array $request_grant_types |
228
|
|
|
|
|
|
|
# @return void |
229
|
|
|
|
|
|
|
sub setRequestGrantTypes{ |
230
|
|
|
|
|
|
|
my ( $self, $request_grant_types ) = @_; |
231
|
|
|
|
|
|
|
$self->{_request_grant_types} = $request_grant_types if defined($request_grant_types); |
232
|
|
|
|
|
|
|
return $self->{_request_grant_types}; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
# @return array |
236
|
|
|
|
|
|
|
sub getRequestScope{ |
237
|
|
|
|
|
|
|
my( $self ) = @_; |
238
|
|
|
|
|
|
|
return $self->{_request_scope}; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
# @param array $request_scope |
242
|
|
|
|
|
|
|
# @return void |
243
|
|
|
|
|
|
|
sub setRequestScope{ |
244
|
|
|
|
|
|
|
my ( $self, $request_scope ) = @_; |
245
|
|
|
|
|
|
|
$self->{_request_scope} = $request_scope if defined($request_scope); |
246
|
|
|
|
|
|
|
return $self->{_request_scope}; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
# @return string |
250
|
|
|
|
|
|
|
sub getRequestPostLogoutRedirectUri{ |
251
|
|
|
|
|
|
|
my( $self ) = @_; |
252
|
|
|
|
|
|
|
return $self->{_request_post_logout_redirect_uri}; |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
# @param string $request_post_logout_redirect_uri |
256
|
|
|
|
|
|
|
# @return void |
257
|
|
|
|
|
|
|
sub setRequestPostLogoutRedirectUri{ |
258
|
|
|
|
|
|
|
my ( $self, $request_post_logout_redirect_uri ) = @_; |
259
|
|
|
|
|
|
|
$self->{_request_post_logout_redirect_uri} = $request_post_logout_redirect_uri if defined($request_post_logout_redirect_uri); |
260
|
|
|
|
|
|
|
return $self->{_request_post_logout_redirect_uri}; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
# @return string |
264
|
|
|
|
|
|
|
sub getRequestClientJwksUri{ |
265
|
|
|
|
|
|
|
my( $self ) = @_; |
266
|
|
|
|
|
|
|
return $self->{_request_client_jwks_uri}; |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
# @param string $request_client_jwks_uri |
270
|
|
|
|
|
|
|
# @return void |
271
|
|
|
|
|
|
|
sub setRequestClientJwksUri{ |
272
|
|
|
|
|
|
|
my ( $self, $request_client_jwks_uri ) = @_; |
273
|
|
|
|
|
|
|
$self->{_request_client_jwks_uri} = $request_client_jwks_uri if defined($request_client_jwks_uri); |
274
|
|
|
|
|
|
|
return $self->{_request_client_jwks_uri}; |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
# @return array |
278
|
|
|
|
|
|
|
sub getRequestClientSectorIdentifierUri{ |
279
|
|
|
|
|
|
|
my( $self ) = @_; |
280
|
|
|
|
|
|
|
return $self->{_request_client_sector_identifier_uri}; |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# @param array $request_client_sector_identifier_uri |
284
|
|
|
|
|
|
|
sub setRequestClientSectorIdentifierUri{ |
285
|
|
|
|
|
|
|
my ( $self, $request_client_sector_identifier_uri ) = @_; |
286
|
|
|
|
|
|
|
$self->{_request_client_sector_identifier_uri} = $request_client_sector_identifier_uri if defined($request_client_sector_identifier_uri); |
287
|
|
|
|
|
|
|
return $self->{_request_client_sector_identifier_uri}; |
288
|
|
|
|
|
|
|
} |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
# @return string |
291
|
|
|
|
|
|
|
sub getRequestClientTokenEndpointAuthMethod{ |
292
|
|
|
|
|
|
|
my( $self ) = @_; |
293
|
|
|
|
|
|
|
return $self->{_request_client_token_endpoint_auth_method}; |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
# @param string $request_client_token_endpoint_auth_method |
297
|
|
|
|
|
|
|
# @return void |
298
|
|
|
|
|
|
|
sub setRequestClientTokenEndpointAuthMethod{ |
299
|
|
|
|
|
|
|
my ( $self, $request_client_token_endpoint_auth_method ) = @_; |
300
|
|
|
|
|
|
|
$self->{_request_client_token_endpoint_auth_method} = $request_client_token_endpoint_auth_method if defined($request_client_token_endpoint_auth_method); |
301
|
|
|
|
|
|
|
return $self->{_request_client_token_endpoint_auth_method}; |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
# @return array |
305
|
|
|
|
|
|
|
sub getRequestClientRequestUris{ |
306
|
|
|
|
|
|
|
my( $self ) = @_; |
307
|
|
|
|
|
|
|
return $self->{_request_client_request_uris}; |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
# @param array $request_client_request_uris |
311
|
|
|
|
|
|
|
# @return void |
312
|
|
|
|
|
|
|
sub setRequestClientRequestUris{ |
313
|
|
|
|
|
|
|
my ( $self, $request_client_request_uris ) = @_; |
314
|
|
|
|
|
|
|
$self->{_request_client_request_uris} = $request_client_request_uris if defined($request_client_request_uris); |
315
|
|
|
|
|
|
|
return $self->{_request_client_request_uris}; |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
# @return string |
319
|
|
|
|
|
|
|
sub getRequestApplicationType{ |
320
|
|
|
|
|
|
|
my( $self ) = @_; |
321
|
|
|
|
|
|
|
return $self->{_request_application_type}; |
322
|
|
|
|
|
|
|
} |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
# @param string $request_application_type |
325
|
|
|
|
|
|
|
# @return void |
326
|
|
|
|
|
|
|
sub setRequestApplicationType{ |
327
|
|
|
|
|
|
|
my ( $self, $request_application_type ) = @_; |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
$request_application_type = $request_application_type ? $request_application_type : 'web'; |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
$self->{_request_application_type} = $request_application_type if defined($request_application_type); |
332
|
|
|
|
|
|
|
return $self->{_request_application_type}; |
333
|
|
|
|
|
|
|
} |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
# @return string |
336
|
|
|
|
|
|
|
sub getRequestAuthorizationRedirectUri{ |
337
|
|
|
|
|
|
|
my( $self ) = @_; |
338
|
|
|
|
|
|
|
return $self->{_request_authorization_redirect_uri}; |
339
|
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
# @param string $request_authorization_redirect_uri |
342
|
|
|
|
|
|
|
# @return void |
343
|
|
|
|
|
|
|
sub setRequestAuthorizationRedirectUri{ |
344
|
|
|
|
|
|
|
my ( $self, $request_authorization_redirect_uri ) = @_; |
345
|
|
|
|
|
|
|
$self->{_request_authorization_redirect_uri} = $request_authorization_redirect_uri if defined($request_authorization_redirect_uri); |
346
|
|
|
|
|
|
|
return $self->{_request_authorization_redirect_uri}; |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
# @return array |
350
|
|
|
|
|
|
|
sub getRequestAcrValues{ |
351
|
|
|
|
|
|
|
my( $self ) = @_; |
352
|
|
|
|
|
|
|
return $self->{_request_acr_values}; |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
# @param array $request_acr_values |
356
|
|
|
|
|
|
|
# @return void |
357
|
|
|
|
|
|
|
sub setRequestAcrValues{ |
358
|
|
|
|
|
|
|
my ( $self, $request_acr_values ) = @_; |
359
|
|
|
|
|
|
|
$self->{_request_acr_values} = $request_acr_values if defined($request_acr_values); |
360
|
|
|
|
|
|
|
return $self->{_request_acr_values}; |
361
|
|
|
|
|
|
|
} |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
# @return array |
364
|
|
|
|
|
|
|
sub getRequestContacts{ |
365
|
|
|
|
|
|
|
my( $self ) = @_; |
366
|
|
|
|
|
|
|
return $self->{_request_contacts}; |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
# @param array $request_contacts |
370
|
|
|
|
|
|
|
# @return void |
371
|
|
|
|
|
|
|
sub setRequestContacts{ |
372
|
|
|
|
|
|
|
my ( $self, $request_contacts ) = @_; |
373
|
|
|
|
|
|
|
$self->{_request_contacts} = $request_contacts if defined($request_contacts); |
374
|
|
|
|
|
|
|
return $self->{_request_contacts}; |
375
|
|
|
|
|
|
|
} |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
# @return string |
378
|
|
|
|
|
|
|
sub getResponseOxdId{ |
379
|
|
|
|
|
|
|
my( $self ) = @_; |
380
|
|
|
|
|
|
|
$self->{_response_oxd_id} = $self->getResponseData()->{oxd_id}; |
381
|
|
|
|
|
|
|
return $self->{_response_oxd_id}; |
382
|
|
|
|
|
|
|
} |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
# @return string |
385
|
|
|
|
|
|
|
sub getResponseOpHost{ |
386
|
|
|
|
|
|
|
my( $self ) = @_; |
387
|
|
|
|
|
|
|
$self->{_response_op_host} = $self->getResponseData()->{op_host}; |
388
|
|
|
|
|
|
|
return $self->{_response_op_host}; |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
# @return array |
392
|
|
|
|
|
|
|
sub getRequestUiLocales{ |
393
|
|
|
|
|
|
|
my( $self ) = @_; |
394
|
|
|
|
|
|
|
return $self->{_request_ui_locales}; |
395
|
|
|
|
|
|
|
} |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
# @param array $request_ui_locales |
398
|
|
|
|
|
|
|
sub setRequestUiLocales{ |
399
|
|
|
|
|
|
|
my ( $self, $request_ui_locales ) = @_; |
400
|
|
|
|
|
|
|
$self->{_request_ui_locales} = $request_ui_locales if defined($request_ui_locales); |
401
|
|
|
|
|
|
|
return $self->{_request_ui_locales}; |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
# @return array |
405
|
|
|
|
|
|
|
sub getRequestClaimsLocales{ |
406
|
|
|
|
|
|
|
my( $self ) = @_; |
407
|
|
|
|
|
|
|
return $self->{_request_claims_locales}; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
# @param array $request_claims_locales |
411
|
|
|
|
|
|
|
sub setRequestClaimsLocales{ |
412
|
|
|
|
|
|
|
my ( $self, $request_claims_locales ) = @_; |
413
|
|
|
|
|
|
|
$self->{_request_claims_locales} = $request_claims_locales if defined($request_claims_locales); |
414
|
|
|
|
|
|
|
return $self->{_request_claims_locales}; |
415
|
|
|
|
|
|
|
} |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
# Protocol command to oxd server |
418
|
|
|
|
|
|
|
# @return void |
419
|
|
|
|
|
|
|
sub setCommand{ |
420
|
|
|
|
|
|
|
# my $command = 'register_site'; |
421
|
|
|
|
|
|
|
my ( $self, $command ) = @_; |
422
|
|
|
|
|
|
|
$self->{_command} = 'register_site'; |
423
|
|
|
|
|
|
|
return $self->{_command}; |
424
|
|
|
|
|
|
|
#return $command; |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
# Protocol parameter to oxd server |
428
|
|
|
|
|
|
|
# @return void |
429
|
|
|
|
|
|
|
sub setParams{ |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
my ( $self, $params ) = @_; |
432
|
|
|
|
|
|
|
#use Data::Dumper; |
433
|
|
|
|
|
|
|
my $paramsArray = { |
434
|
|
|
|
|
|
|
"authorization_redirect_uri" => $self->getRequestAuthorizationRedirectUri(), |
435
|
|
|
|
|
|
|
"op_host" => $self->getRequestOpHost(), |
436
|
|
|
|
|
|
|
"post_logout_redirect_uri" => $self->getRequestPostLogoutRedirectUri(), |
437
|
|
|
|
|
|
|
"application_type" => $self->getRequestApplicationType(), |
438
|
|
|
|
|
|
|
"response_types"=> $self->getRequestResponseTypes(), |
439
|
|
|
|
|
|
|
"grant_types" => $self->getRequestGrantTypes(), |
440
|
|
|
|
|
|
|
"scope" => $self->getRequestScope(), |
441
|
|
|
|
|
|
|
"acr_values" => $self->getRequestAcrValues(), |
442
|
|
|
|
|
|
|
"client_name"=> $self->getRequestClientName(), |
443
|
|
|
|
|
|
|
"client_jwks_uri" => $self->getRequestClientJwksUri(), |
444
|
|
|
|
|
|
|
"client_token_endpoint_auth_method" => $self->getRequestClientTokenEndpointAuthMethod(), |
445
|
|
|
|
|
|
|
"client_request_uris" => $self->getRequestClientRequestUris(), |
446
|
|
|
|
|
|
|
"client_logout_uris"=> $self->getRequestClientLogoutUris(), |
447
|
|
|
|
|
|
|
"client_sector_identifier_uri"=> $self->getRequestClientSectorIdentifierUri(), |
448
|
|
|
|
|
|
|
"contacts" => $self->getRequestContacts(), |
449
|
|
|
|
|
|
|
"ui_locales" => $self->getRequestUiLocales(), |
450
|
|
|
|
|
|
|
"claims_locales" => $self->getRequestClaimsLocales(), |
451
|
|
|
|
|
|
|
"client_id"=> $self->getRequestClientId(), |
452
|
|
|
|
|
|
|
"client_secret"=> $self->getRequestClientSecret() |
453
|
|
|
|
|
|
|
}; |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
$self->{_params} = $paramsArray; |
456
|
|
|
|
|
|
|
return $self->{_params}; |
457
|
|
|
|
|
|
|
#print Dumper( $params ); |
458
|
|
|
|
|
|
|
#return $paramsArray; |
459
|
|
|
|
|
|
|
} |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
1; # this 1; is neccessary for our class to work |