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 Perl
|
8
|
|
|
|
|
|
|
#
|
9
|
|
|
|
|
|
|
# This content is released under the MIT License (MIT)
|
10
|
|
|
|
|
|
|
#
|
11
|
|
|
|
|
|
|
# Copyright (c) 2017, 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 3.1.0
|
33
|
|
|
|
|
|
|
# @author Ourdesignz, Sobhan Panda
|
34
|
|
|
|
|
|
|
# @author_email gaurav.chhabra6785@gmail.com, sobhan@centroxy.com
|
35
|
|
|
|
|
|
|
# @copyright Copyright (c) 2017, Gluu inc federation (https://gluu.org/)
|
36
|
|
|
|
|
|
|
# @license http://opensource.org/licenses/MIT MIT License
|
37
|
|
|
|
|
|
|
# @link https://gluu.org/
|
38
|
|
|
|
|
|
|
# @since Version 3.1.0
|
39
|
|
|
|
|
|
|
# @filesource
|
40
|
|
|
|
|
|
|
#/
|
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
1
|
|
13
|
use JSON::PP;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
83
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
package OxdRegister; # This is the "Class"
|
45
|
1
|
|
|
1
|
|
9
|
use vars qw($VERSION);
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
65
|
|
46
|
|
|
|
|
|
|
$VERSION = '0.01';
|
47
|
|
|
|
|
|
|
|
48
|
1
|
|
|
1
|
|
428
|
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_frontchannel_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
|
|
|
|
|
|
|
# @var string _request_claims_redirect_uri
|
121
|
|
|
|
|
|
|
_request_claims_redirect_uri => shift,
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
# @var array $request_protection_access_token To protect the command with access token
|
124
|
|
|
|
|
|
|
_request_protection_access_token => shift,
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# Response parameter from oxd-server
|
127
|
|
|
|
|
|
|
# It is basic parameter for other protocols
|
128
|
|
|
|
|
|
|
#
|
129
|
|
|
|
|
|
|
# @var string _response_oxd_id
|
130
|
|
|
|
|
|
|
_response_oxd_id => shift,
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
# Response parameter from oxd-server
|
133
|
|
|
|
|
|
|
#
|
134
|
|
|
|
|
|
|
# @var string _response_op_host
|
135
|
|
|
|
|
|
|
_response_op_host => shift,
|
136
|
|
|
|
|
|
|
};
|
137
|
|
|
|
|
|
|
# Print all the values just for clarification.
|
138
|
|
|
|
|
|
|
#print "First Name is $self->{_firstName}\n";
|
139
|
|
|
|
|
|
|
#print "Last Name is $self->{_lastName}\n";
|
140
|
|
|
|
|
|
|
#print "URl is $self->{_request_authorization_redirect_uri}\n";
|
141
|
|
|
|
|
|
|
#print " ";
|
142
|
|
|
|
|
|
|
bless $self, $class;
|
143
|
|
|
|
|
|
|
return $self;
|
144
|
|
|
|
|
|
|
}
|
145
|
|
|
|
|
|
|
sub _initialize {}
|
146
|
|
|
|
|
|
|
# @return string
|
147
|
|
|
|
|
|
|
sub getRequestClientName{
|
148
|
|
|
|
|
|
|
my( $self ) = @_;
|
149
|
|
|
|
|
|
|
return $self->{_request_client_name};
|
150
|
|
|
|
|
|
|
}
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# @param string $request_client_name
|
153
|
|
|
|
|
|
|
sub setRequestClientName{
|
154
|
|
|
|
|
|
|
my ( $self, $request_client_name ) = @_;
|
155
|
|
|
|
|
|
|
$self->{_request_client_name} = $request_client_name if defined($request_client_name);
|
156
|
|
|
|
|
|
|
return $self->{_request_client_name};
|
157
|
|
|
|
|
|
|
}
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
# @return string
|
160
|
|
|
|
|
|
|
sub getRequestClientSecret{
|
161
|
|
|
|
|
|
|
my( $self ) = @_;
|
162
|
|
|
|
|
|
|
return $self->{_request_client_secret};
|
163
|
|
|
|
|
|
|
}
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
# @param string $request_client_secret
|
166
|
|
|
|
|
|
|
sub setRequestClientSecret{
|
167
|
|
|
|
|
|
|
my ( $self, $request_client_secret ) = @_;
|
168
|
|
|
|
|
|
|
$self->{_request_client_secret} = $request_client_secret if defined($request_client_secret);
|
169
|
|
|
|
|
|
|
return $self->{_request_client_secret};
|
170
|
|
|
|
|
|
|
}
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
# @return string
|
173
|
|
|
|
|
|
|
sub getRequestClientId{
|
174
|
|
|
|
|
|
|
my( $self ) = @_;
|
175
|
|
|
|
|
|
|
return $self->{_request_client_id};
|
176
|
|
|
|
|
|
|
}
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
# @param string $request_client_id
|
179
|
|
|
|
|
|
|
sub setRequestClientId{
|
180
|
|
|
|
|
|
|
my ( $self, $request_client_id ) = @_;
|
181
|
|
|
|
|
|
|
$self->{_request_client_id} = $request_client_id if defined($request_client_id);
|
182
|
|
|
|
|
|
|
return $self->{_request_client_id};
|
183
|
|
|
|
|
|
|
}
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
# @param string $request_op_host
|
186
|
|
|
|
|
|
|
# @return void
|
187
|
|
|
|
|
|
|
sub setRequestOpHost {
|
188
|
|
|
|
|
|
|
my ( $self, $request_op_host ) = @_;
|
189
|
|
|
|
|
|
|
$self->{_request_op_host} = $request_op_host if defined($request_op_host);
|
190
|
|
|
|
|
|
|
return $self->{_request_op_host};
|
191
|
|
|
|
|
|
|
}
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# @return string
|
194
|
|
|
|
|
|
|
sub getRequestOpHost {
|
195
|
|
|
|
|
|
|
my( $self ) = @_;
|
196
|
|
|
|
|
|
|
return $self->{_request_op_host};
|
197
|
|
|
|
|
|
|
}
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
# @return array
|
201
|
|
|
|
|
|
|
sub getRequestClientLogoutUris
|
202
|
|
|
|
|
|
|
{
|
203
|
|
|
|
|
|
|
my( $self ) = @_;
|
204
|
|
|
|
|
|
|
return $self->{_request_client_frontchannel_logout_uris};
|
205
|
|
|
|
|
|
|
}
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
# @param array $request_client_logout_uris
|
208
|
|
|
|
|
|
|
# @return void
|
209
|
|
|
|
|
|
|
sub setRequestClientLogoutUris
|
210
|
|
|
|
|
|
|
{
|
211
|
|
|
|
|
|
|
my ( $self, $request_client_frontchannel_logout_uris ) = @_;
|
212
|
|
|
|
|
|
|
$self->{_request_client_frontchannel_logout_uris} = $request_client_frontchannel_logout_uris if defined($request_client_frontchannel_logout_uris);
|
213
|
|
|
|
|
|
|
return $self->{_request_client_frontchannel_logout_uris};
|
214
|
|
|
|
|
|
|
}
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
# @return array
|
217
|
|
|
|
|
|
|
sub getRequestResponseTypes{
|
218
|
|
|
|
|
|
|
my( $self ) = @_;
|
219
|
|
|
|
|
|
|
return $self->{_request_response_types};
|
220
|
|
|
|
|
|
|
}
|
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
# @param array $request_response_types
|
223
|
|
|
|
|
|
|
# @return void
|
224
|
|
|
|
|
|
|
sub setRequestResponseTypes{
|
225
|
|
|
|
|
|
|
my ( $self, $request_response_types ) = @_;
|
226
|
|
|
|
|
|
|
$self->{_request_response_types} = $request_response_types if defined($request_response_types);
|
227
|
|
|
|
|
|
|
return $self->{_request_response_types};
|
228
|
|
|
|
|
|
|
}
|
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
# @return array
|
231
|
|
|
|
|
|
|
sub getRequestGrantTypes{
|
232
|
|
|
|
|
|
|
my( $self ) = @_;
|
233
|
|
|
|
|
|
|
return $self->{_request_grant_types};
|
234
|
|
|
|
|
|
|
}
|
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
# @param array $request_grant_types
|
237
|
|
|
|
|
|
|
# @return void
|
238
|
|
|
|
|
|
|
sub setRequestGrantTypes{
|
239
|
|
|
|
|
|
|
my ( $self, $request_grant_types ) = @_;
|
240
|
|
|
|
|
|
|
$self->{_request_grant_types} = $request_grant_types if defined($request_grant_types);
|
241
|
|
|
|
|
|
|
return $self->{_request_grant_types};
|
242
|
|
|
|
|
|
|
}
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
# @return array
|
245
|
|
|
|
|
|
|
sub getRequestScope{
|
246
|
|
|
|
|
|
|
my( $self ) = @_;
|
247
|
|
|
|
|
|
|
return $self->{_request_scope};
|
248
|
|
|
|
|
|
|
}
|
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
# @param array $request_scope
|
251
|
|
|
|
|
|
|
# @return void
|
252
|
|
|
|
|
|
|
sub setRequestScope{
|
253
|
|
|
|
|
|
|
my ( $self, $request_scope ) = @_;
|
254
|
|
|
|
|
|
|
$self->{_request_scope} = $request_scope if defined($request_scope);
|
255
|
|
|
|
|
|
|
return $self->{_request_scope};
|
256
|
|
|
|
|
|
|
}
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
# @return string
|
259
|
|
|
|
|
|
|
sub getRequestPostLogoutRedirectUri{
|
260
|
|
|
|
|
|
|
my( $self ) = @_;
|
261
|
|
|
|
|
|
|
return $self->{_request_post_logout_redirect_uri};
|
262
|
|
|
|
|
|
|
}
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
# @param string $request_post_logout_redirect_uri
|
265
|
|
|
|
|
|
|
# @return void
|
266
|
|
|
|
|
|
|
sub setRequestPostLogoutRedirectUri{
|
267
|
|
|
|
|
|
|
my ( $self, $request_post_logout_redirect_uri ) = @_;
|
268
|
|
|
|
|
|
|
$self->{_request_post_logout_redirect_uri} = $request_post_logout_redirect_uri if defined($request_post_logout_redirect_uri);
|
269
|
|
|
|
|
|
|
return $self->{_request_post_logout_redirect_uri};
|
270
|
|
|
|
|
|
|
}
|
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
# @return string
|
273
|
|
|
|
|
|
|
sub getRequestClientJwksUri{
|
274
|
|
|
|
|
|
|
my( $self ) = @_;
|
275
|
|
|
|
|
|
|
return $self->{_request_client_jwks_uri};
|
276
|
|
|
|
|
|
|
}
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
# @param string $request_client_jwks_uri
|
279
|
|
|
|
|
|
|
# @return void
|
280
|
|
|
|
|
|
|
sub setRequestClientJwksUri{
|
281
|
|
|
|
|
|
|
my ( $self, $request_client_jwks_uri ) = @_;
|
282
|
|
|
|
|
|
|
$self->{_request_client_jwks_uri} = $request_client_jwks_uri if defined($request_client_jwks_uri);
|
283
|
|
|
|
|
|
|
return $self->{_request_client_jwks_uri};
|
284
|
|
|
|
|
|
|
}
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
# @return array
|
287
|
|
|
|
|
|
|
sub getRequestClientSectorIdentifierUri{
|
288
|
|
|
|
|
|
|
my( $self ) = @_;
|
289
|
|
|
|
|
|
|
return $self->{_request_client_sector_identifier_uri};
|
290
|
|
|
|
|
|
|
}
|
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
# @param array $request_client_sector_identifier_uri
|
293
|
|
|
|
|
|
|
sub setRequestClientSectorIdentifierUri{
|
294
|
|
|
|
|
|
|
my ( $self, $request_client_sector_identifier_uri ) = @_;
|
295
|
|
|
|
|
|
|
$self->{_request_client_sector_identifier_uri} = $request_client_sector_identifier_uri if defined($request_client_sector_identifier_uri);
|
296
|
|
|
|
|
|
|
return $self->{_request_client_sector_identifier_uri};
|
297
|
|
|
|
|
|
|
}
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
# @return string
|
300
|
|
|
|
|
|
|
sub getRequestClientTokenEndpointAuthMethod{
|
301
|
|
|
|
|
|
|
my( $self ) = @_;
|
302
|
|
|
|
|
|
|
return $self->{_request_client_token_endpoint_auth_method};
|
303
|
|
|
|
|
|
|
}
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
# @param string $request_client_token_endpoint_auth_method
|
306
|
|
|
|
|
|
|
# @return void
|
307
|
|
|
|
|
|
|
sub setRequestClientTokenEndpointAuthMethod{
|
308
|
|
|
|
|
|
|
my ( $self, $request_client_token_endpoint_auth_method ) = @_;
|
309
|
|
|
|
|
|
|
$self->{_request_client_token_endpoint_auth_method} = $request_client_token_endpoint_auth_method if defined($request_client_token_endpoint_auth_method);
|
310
|
|
|
|
|
|
|
return $self->{_request_client_token_endpoint_auth_method};
|
311
|
|
|
|
|
|
|
}
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
# @return array
|
314
|
|
|
|
|
|
|
sub getRequestClientRequestUris{
|
315
|
|
|
|
|
|
|
my( $self ) = @_;
|
316
|
|
|
|
|
|
|
return $self->{_request_client_request_uris};
|
317
|
|
|
|
|
|
|
}
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
# @param array $request_client_request_uris
|
320
|
|
|
|
|
|
|
# @return void
|
321
|
|
|
|
|
|
|
sub setRequestClientRequestUris{
|
322
|
|
|
|
|
|
|
my ( $self, $request_client_request_uris ) = @_;
|
323
|
|
|
|
|
|
|
$self->{_request_client_request_uris} = $request_client_request_uris if defined($request_client_request_uris);
|
324
|
|
|
|
|
|
|
return $self->{_request_client_request_uris};
|
325
|
|
|
|
|
|
|
}
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
# @return string
|
328
|
|
|
|
|
|
|
sub getRequestApplicationType{
|
329
|
|
|
|
|
|
|
my( $self ) = @_;
|
330
|
|
|
|
|
|
|
return $self->{_request_application_type};
|
331
|
|
|
|
|
|
|
}
|
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
# @param string $request_application_type
|
334
|
|
|
|
|
|
|
# @return void
|
335
|
|
|
|
|
|
|
sub setRequestApplicationType{
|
336
|
|
|
|
|
|
|
my ( $self, $request_application_type ) = @_;
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
$request_application_type = $request_application_type ? $request_application_type : 'web';
|
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
$self->{_request_application_type} = $request_application_type if defined($request_application_type);
|
341
|
|
|
|
|
|
|
return $self->{_request_application_type};
|
342
|
|
|
|
|
|
|
}
|
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
# @return string
|
345
|
|
|
|
|
|
|
sub getRequestAuthorizationRedirectUri{
|
346
|
|
|
|
|
|
|
my( $self ) = @_;
|
347
|
|
|
|
|
|
|
return $self->{_request_authorization_redirect_uri};
|
348
|
|
|
|
|
|
|
}
|
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
# @param string $request_authorization_redirect_uri
|
351
|
|
|
|
|
|
|
# @return void
|
352
|
|
|
|
|
|
|
sub setRequestAuthorizationRedirectUri{
|
353
|
|
|
|
|
|
|
my ( $self, $request_authorization_redirect_uri ) = @_;
|
354
|
|
|
|
|
|
|
$self->{_request_authorization_redirect_uri} = $request_authorization_redirect_uri if defined($request_authorization_redirect_uri);
|
355
|
|
|
|
|
|
|
return $self->{_request_authorization_redirect_uri};
|
356
|
|
|
|
|
|
|
}
|
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
# @return array
|
359
|
|
|
|
|
|
|
sub getRequestAcrValues{
|
360
|
|
|
|
|
|
|
my( $self ) = @_;
|
361
|
|
|
|
|
|
|
return $self->{_request_acr_values};
|
362
|
|
|
|
|
|
|
}
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
# @param array $request_acr_values
|
365
|
|
|
|
|
|
|
# @return void
|
366
|
|
|
|
|
|
|
sub setRequestAcrValues{
|
367
|
|
|
|
|
|
|
my ( $self, $request_acr_values ) = @_;
|
368
|
|
|
|
|
|
|
$self->{_request_acr_values} = $request_acr_values if defined($request_acr_values);
|
369
|
|
|
|
|
|
|
return $self->{_request_acr_values};
|
370
|
|
|
|
|
|
|
}
|
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
# @return array
|
373
|
|
|
|
|
|
|
sub getRequestContacts{
|
374
|
|
|
|
|
|
|
my( $self ) = @_;
|
375
|
|
|
|
|
|
|
return $self->{_request_contacts};
|
376
|
|
|
|
|
|
|
}
|
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
# @param array $request_contacts
|
379
|
|
|
|
|
|
|
# @return void
|
380
|
|
|
|
|
|
|
sub setRequestContacts{
|
381
|
|
|
|
|
|
|
my ( $self, $request_contacts ) = @_;
|
382
|
|
|
|
|
|
|
$self->{_request_contacts} = $request_contacts if defined($request_contacts);
|
383
|
|
|
|
|
|
|
return $self->{_request_contacts};
|
384
|
|
|
|
|
|
|
}
|
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
# @return string
|
387
|
|
|
|
|
|
|
sub getRequestClaimsRedirectUri {
|
388
|
|
|
|
|
|
|
my( $self ) = @_;
|
389
|
|
|
|
|
|
|
return $self->{_request_claims_redirect_uri};
|
390
|
|
|
|
|
|
|
}
|
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
# @param string $request_claims_redirect_uri
|
393
|
|
|
|
|
|
|
sub setRequestClaimsRedirectUri {
|
394
|
|
|
|
|
|
|
my ( $self, $request_claims_redirect_uri ) = @_;
|
395
|
|
|
|
|
|
|
$self->{_request_claims_redirect_uri} = $request_claims_redirect_uri if defined($request_claims_redirect_uri);
|
396
|
|
|
|
|
|
|
return $self->{_request_claims_redirect_uri};
|
397
|
|
|
|
|
|
|
}
|
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
# @return string
|
400
|
|
|
|
|
|
|
sub getResponseOxdId{
|
401
|
|
|
|
|
|
|
my( $self ) = @_;
|
402
|
|
|
|
|
|
|
$self->{_response_oxd_id} = $self->getResponseData()->{oxd_id};
|
403
|
|
|
|
|
|
|
return $self->{_response_oxd_id};
|
404
|
|
|
|
|
|
|
}
|
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
# @return string
|
407
|
|
|
|
|
|
|
sub getResponseOpHost{
|
408
|
|
|
|
|
|
|
my( $self ) = @_;
|
409
|
|
|
|
|
|
|
$self->{_response_op_host} = $self->getResponseData()->{op_host};
|
410
|
|
|
|
|
|
|
return $self->{_response_op_host};
|
411
|
|
|
|
|
|
|
}
|
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
# @return array
|
414
|
|
|
|
|
|
|
sub getRequestUiLocales{
|
415
|
|
|
|
|
|
|
my( $self ) = @_;
|
416
|
|
|
|
|
|
|
return $self->{_request_ui_locales};
|
417
|
|
|
|
|
|
|
}
|
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
# @param array $request_ui_locales
|
420
|
|
|
|
|
|
|
sub setRequestUiLocales{
|
421
|
|
|
|
|
|
|
my ( $self, $request_ui_locales ) = @_;
|
422
|
|
|
|
|
|
|
$self->{_request_ui_locales} = $request_ui_locales if defined($request_ui_locales);
|
423
|
|
|
|
|
|
|
return $self->{_request_ui_locales};
|
424
|
|
|
|
|
|
|
}
|
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
# @return array
|
427
|
|
|
|
|
|
|
sub getRequestClaimsLocales{
|
428
|
|
|
|
|
|
|
my( $self ) = @_;
|
429
|
|
|
|
|
|
|
return $self->{_request_claims_locales};
|
430
|
|
|
|
|
|
|
}
|
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
# @param array $request_claims_locales
|
433
|
|
|
|
|
|
|
sub setRequestClaimsLocales{
|
434
|
|
|
|
|
|
|
my ( $self, $request_claims_locales ) = @_;
|
435
|
|
|
|
|
|
|
$self->{_request_claims_locales} = $request_claims_locales if defined($request_claims_locales);
|
436
|
|
|
|
|
|
|
return $self->{_request_claims_locales};
|
437
|
|
|
|
|
|
|
}
|
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
# @return array
|
441
|
|
|
|
|
|
|
sub getRequestProtectionAccessToken
|
442
|
|
|
|
|
|
|
{
|
443
|
|
|
|
|
|
|
my( $self ) = @_;
|
444
|
|
|
|
|
|
|
return $self->{_request_protection_access_token};
|
445
|
|
|
|
|
|
|
}
|
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
# @param array $request_request_protection_access_token
|
449
|
|
|
|
|
|
|
# @return void
|
450
|
|
|
|
|
|
|
sub setRequestProtectionAccessToken
|
451
|
|
|
|
|
|
|
{
|
452
|
|
|
|
|
|
|
my ( $self, $request_protection_access_token ) = @_;
|
453
|
|
|
|
|
|
|
$self->{_request_protection_access_token} = $request_protection_access_token if defined($request_protection_access_token);
|
454
|
|
|
|
|
|
|
return $self->{_request_protection_access_token};
|
455
|
|
|
|
|
|
|
}
|
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
# Protocol command to oxd server
|
458
|
|
|
|
|
|
|
# @return void
|
459
|
|
|
|
|
|
|
sub setCommand{
|
460
|
|
|
|
|
|
|
# my $command = 'register_site';
|
461
|
|
|
|
|
|
|
my ( $self, $command ) = @_;
|
462
|
|
|
|
|
|
|
$self->{_command} = 'register_site';
|
463
|
|
|
|
|
|
|
return $self->{_command};
|
464
|
|
|
|
|
|
|
#return $command;
|
465
|
|
|
|
|
|
|
}
|
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
# Protocol command to oxd to http server
|
468
|
|
|
|
|
|
|
# @return void
|
469
|
|
|
|
|
|
|
sub sethttpCommand{
|
470
|
|
|
|
|
|
|
# my $command = 'register-site';
|
471
|
|
|
|
|
|
|
my ( $self, $httpCommand ) = @_;
|
472
|
|
|
|
|
|
|
$self->{_httpcommand} = 'register-site';
|
473
|
|
|
|
|
|
|
return $self->{_httpcommand};
|
474
|
|
|
|
|
|
|
#return $httpcommand;
|
475
|
|
|
|
|
|
|
}
|
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
# Protocol parameter to oxd server
|
478
|
|
|
|
|
|
|
# @return void
|
479
|
|
|
|
|
|
|
sub setParams{
|
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
my ( $self, $params ) = @_;
|
482
|
|
|
|
|
|
|
#use Data::Dumper;
|
483
|
|
|
|
|
|
|
my $paramsArray = {
|
484
|
|
|
|
|
|
|
"authorization_redirect_uri" => $self->getRequestAuthorizationRedirectUri(),
|
485
|
|
|
|
|
|
|
"op_host" => $self->getRequestOpHost(),
|
486
|
|
|
|
|
|
|
"post_logout_redirect_uri" => $self->getRequestPostLogoutRedirectUri(),
|
487
|
|
|
|
|
|
|
"application_type" => $self->getRequestApplicationType(),
|
488
|
|
|
|
|
|
|
"response_types"=> $self->getRequestResponseTypes(),
|
489
|
|
|
|
|
|
|
"grant_types" => $self->getRequestGrantTypes(),
|
490
|
|
|
|
|
|
|
"scope" => $self->getRequestScope(),
|
491
|
|
|
|
|
|
|
"acr_values" => $self->getRequestAcrValues(),
|
492
|
|
|
|
|
|
|
"client_name"=> $self->getRequestClientName(),
|
493
|
|
|
|
|
|
|
"client_jwks_uri" => $self->getRequestClientJwksUri(),
|
494
|
|
|
|
|
|
|
"client_token_endpoint_auth_method" => $self->getRequestClientTokenEndpointAuthMethod(),
|
495
|
|
|
|
|
|
|
"client_request_uris" => $self->getRequestClientRequestUris(),
|
496
|
|
|
|
|
|
|
"client_frontchannel_logout_uris"=> $self->getRequestClientLogoutUris(),
|
497
|
|
|
|
|
|
|
"client_sector_identifier_uri"=> $self->getRequestClientSectorIdentifierUri(),
|
498
|
|
|
|
|
|
|
"contacts" => $self->getRequestContacts(),
|
499
|
|
|
|
|
|
|
"ui_locales" => $self->getRequestUiLocales(),
|
500
|
|
|
|
|
|
|
"claims_locales" => $self->getRequestClaimsLocales(),
|
501
|
|
|
|
|
|
|
"client_id" => $self->getRequestClientId(),
|
502
|
|
|
|
|
|
|
"client_secret" => $self->getRequestClientSecret(),
|
503
|
|
|
|
|
|
|
"protection_access_token"=> $self->getRequestProtectionAccessToken(),
|
504
|
|
|
|
|
|
|
"claims_redirect_uri" => $self->getRequestClaimsRedirectUri(),
|
505
|
|
|
|
|
|
|
"oxd_rp_programming_language" => 'perl'
|
506
|
|
|
|
|
|
|
};
|
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
$self->{_params} = $paramsArray;
|
509
|
|
|
|
|
|
|
return $self->{_params};
|
510
|
|
|
|
|
|
|
#print Dumper( $params );
|
511
|
|
|
|
|
|
|
#return $paramsArray;
|
512
|
|
|
|
|
|
|
}
|
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
1; # this 1; is neccessary for our class to work
|