blib/lib/Lemonldap/NG/Portal/Main/Issuer.pm

filter: Statementstmt 47.6% 81 / 170 Branchbran 20.3% 11 / 54 Conditioncond 17.3% 4 / 23 MC/DCmcdc 0.0% 0 / 15 Subroutinesub 65.0% 13 / 20 Podpod 0.0% 0 / 9 totaltotal 37.4% 109 / 291 CC 40 SCAR 36.7
CC
40
Cov
39%
cleanPdata
110.0
_forAuthUser
90.0
restoreRequest
42.0
CRAP 39.4
« blib/lib/Lemonldap/NG/Portal/2F/Yubikey.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Lib/WebAuthn.pm »
1 # Base package for simple issuers plugins
2 #
3 # Issuer should just implement a run() method that will be called only for
4 # authenticated users when PATH_INFO starts with issuerDBXXPath
5 #
6 # run() should just return a Lemonldap::NG::Portal::Main::Constants value. It
7 # is called using process() method (Lemonldap::NG::Portal::Main::Process)
8 package Lemonldap::NG::Portal::Main::Issuer;
9  
10 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 29 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 29 ▶use MIME::Base64;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 29 ▶use IO::String;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 29 ▶use URI::Escape;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 29 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 29 ▶use Lemonldap::NG::Common::FormEncode;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 29 use Lemonldap::NG::Portal::Main::Constants qw(
18 PE_OK
19 PE_RENEWSESSION
20 PE_UPGRADESESSION
21 PE_TOKENEXPIRED
22 29 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 29 extends 'Lemonldap::NG::Portal::Main::Plugin';
25  
26 29 our $VERSION = '2.22.0';
27  
28 # PROPERTIES
29  
30 29 has type => ( is => 'rw' );
31 29 has path => ( is => 'rw' );
32 29 has ipath => ( is => 'rw' );
33 has _ott => (
34 is => 'rw',
35 lazy => 1,
36 default => sub {
37 4 ▶ my $ott = $_[0]->{p}->loadModule('::Lib::OneTimeToken');
Subroutine __ANON__: called CC=2 SCAR=7.4
38 my $timeout = $_[0]->{conf}->{issuersTimeout}
39 4 ▶ // $_[0]->{conf}->{formTimeout};
Condition33%1/3
$_[0]{"conf"}{"issuersTimeout"} // $_[0]{"conf"}{"formTimeout"}
l!l&&r!l&&!r
400
MC/DC0%0/2
$_[0]{"conf"}{"issuersTimeout"} // $_[0]{"conf"}{"formTimeout"}
$_[0]{"conf"}{"issuersTimeout"} $_[0]{"conf"}{"formTimeout"}
Truth table33%1/3
A // B
A= $_[0]{"conf"}{"issuersTimeout"}B= $_[0]{"conf"}{"formTimeout"}
ABresult
1X1
011
000
40 4 $ott->timeout($timeout);
41 4 return $ott;
42 }
43 29 );
44  
45 # INTERFACE
46  
47 # Only logout is called in normal use. Issuer that inherits from this
48 # package are called only by their path
49 46 ▶sub beforeLogout { 'logout' }
Subroutine beforeLogout: called CC=1 SCAR=0.0
Pod undocumented
50  
51 # INITIALIZATION
52  
53 sub init {
54 46 ▶ my ($self) = @_;
Subroutine init: called CC=3 SCAR=11.6
Pod undocumented
55 46 ▶ if ( $self->conf->{forceGlobalStorageIssuerOTT} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->conf->{"forceGlobalStorageIssuerOTT"}) 0 46 46
56 0 $self->logger->debug(
57 "-> Issuer tokens will be stored into global storage");
58 0 $self->_ott->cache(undef);
59 }
60  
61 46 my $type = ref( $_[0] );
62 46 $type =~ s/.*:://;
63 46 $self->type($type);
64 46 ▶ if ( my $path = $self->conf->{"issuerDB${type}Path"} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $path = $self->conf->{"issuerDB${type}Path"}) { } 46 0 46
65 46 $path =~ s/^.*?(\w+).*?$/$1/;
66 46 $self->path($path);
67 46 $self->addUnauthRoute(
68 $path => { '*' => '_redirect' },
69 [ 'GET', 'POST' ]
70 );
71 46 $self->addAuthRoute(
72 $path => { '*' => "_forAuthUser" },
73 [ 'GET', 'POST' ]
74 );
75 }
76 else {
77 0 $self->logger->debug("No path declared for issuer $type. Skipping");
78 }
79 46 $self->ipath( 'issuerRequest' . $self->path );
80 }
81  
82 # RUNNING METHODS
83  
84 # Case 1: Unauthentified users are redirected to the main portal
85  
86 sub _redirect {
87 9 ▶ my ( $self, $req, @path ) = @_;
Subroutine _redirect: called CC=7 SCAR=20.3
88 9 ▶ if ( $req->pdata->{issuerTs}
Branch: 1 branch
BranchTrueFalseTotal
if ($req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()) 0 9 9
Condition33%1/3
$req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
!ll&&!rl&&r
900
MC/DC0%0/2
$req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
$req->pdata->{"issuerTs"} $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
Truth table33%1/3
A and B
A= $req->pdata->{"issuerTs"}B= $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
ABresult
0X0
100
111
89 and $req->pdata->{issuerTs} + $self->conf->{issuersTimeout} < time )
90 {
91 0 $self->cleanAllPdata($req);
92 }
93 9 my $restore;
94 my $ir;
95 9 ▶ unless ( $self->can('ssoMatch') and not $self->ssoMatch($req) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can('ssoMatch') and not $self->ssoMatch($req)) { } 0 9 9
Condition66%2/3
$self->can("ssoMatch") and not $self->ssoMatch($req)
!ll&&!rl&&r
720
MC/DC0%0/2
$self->can("ssoMatch") and not $self->ssoMatch($req)
$self->can("ssoMatch") not $self->ssoMatch($req)
Truth table66%2/3
A and not(B)
A= $self->can("ssoMatch")B= not $self->ssoMatch($req)
ABresult
0X0
100
111
96 9 $self->logger->debug("Unauth request to $self->{path} issuer");
97 9 $restore = 1;
98 9 $self->logger->debug('Processing _redirect');
99 9 ▶ if ( !$req->param("inProgress") ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($req->param("inProgress")) 9 0 9
100 9 $req->pdata->{ $self->ipath } = $self->storeRequest($req);
101 }
102 9 $self->p->setHiddenFormValue( $req, "inProgress", 1, '', 0 );
103 9 $ir = $req->pdata->{ $self->ipath };
104 9 $req->pdata->{ $self->ipath . 'Path' } = \@path;
105 9 $self->logger->debug(
106 'Add ' . $self->ipath . ', ' . $self->ipath . 'Path in keepPdata' );
107 9 push @{ $req->pdata->{keepPdata} }, $self->ipath, $self->ipath . 'Path';
108 9 $req->{urldc} = $self->p->buildUrl( $req->portal, $self->path );
109 9 $req->pdata->{_url} = encode_base64( $req->urldc, '' );
110 9 $req->pdata->{issuerTs} = time;
111 }
112 else {
113 0 $self->logger->debug('Not seen as Issuer request, skipping');
114 }
115  
116 # TODO: launch normal process with 'run' at the end
117 return $self->p->do(
118 $req,
119 [
120 'controlUrl',
121 9 @{ $self->p->beforeAuth },
122 $self->p->authProcess,
123 9 @{ $self->p->betweenAuthAndData },
124 $self->p->sessionData,
125 9 @{ $self->p->afterData },
126 $self->p->validSession,
127 9 ▶ @{ $self->p->endAuth },
Branch: 1 branch
BranchTrueFalseTotal
$restore ? : 9 0 9
128 (
129 $restore
130 ? (
131 # Restore urldc if auth doesn't need to dial with browser
132 [ ref($self) . "::resumeProcess", $ir, @path ],
133 )
134 : ()
135 )
136 ]
137 );
138 }
139  
140 sub resumeProcess {
141 0 ▶ my ( $self, $req, $ir, @path ) = @_;
Subroutine resumeProcess: not called CC=1 SCAR=6.9
Pod undocumented
142  
143 0 $self->p->clearHiddenFormValue($req, [ 'inProgress' ]);
144 0 $self->restoreRequest( $req, $ir );
145 0 $self->cleanPdata($req);
146 0 return $self->run( $req, @path );
147 }
148  
149 # Case 3: authentified user, launch
150 sub _forAuthUser {
151 0 ▶ my ( $self, $req, @path ) = @_;
Subroutine _forAuthUser: not called CC=9 SCAR=45.0
152  
153 0 my $restore_failed;
154 0 ▶ if ( $req->pdata->{issuerTs}
Branch: 1 branch
BranchTrueFalseTotal
if ($req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()) 0 0 0
Condition0%0/3
$req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
!ll&&!rl&&r
000
MC/DC0%0/2
$req->pdata->{"issuerTs"} and $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
$req->pdata->{"issuerTs"} $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
Truth table0%0/3
A and B
A= $req->pdata->{"issuerTs"}B= $req->pdata->{"issuerTs"} + $self->conf->{"issuersTimeout"} < &CORE::GLOBAL::time()
ABresult
0X0
100
111
155 and $req->pdata->{issuerTs} + $self->conf->{issuersTimeout} < time )
156 {
157 0 $restore_failed = 1;
158 0 $self->cleanAllPdata($req);
159 }
160  
161 0 $self->logger->debug('Processing _forAuthUser');
162 0 ▶ if ( my $r = $req->pdata->{ $self->ipath } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $r = $req->pdata->{$self->ipath}) 0 0 0
163 0 $self->logger->debug("Restoring request to $self->{path} issuer");
164 0 ▶ if ( $self->restoreRequest( $req, $r ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->restoreRequest($req, $r)) { } 0 0 0
165 0 @path = @{ $req->pdata->{ $self->ipath . 'Path' } }
166 0 ▶ if ( $req->pdata->{ $self->ipath . 'Path' } );
Branch: 1 branch
BranchTrueFalseTotal
if $req->pdata->{$self->ipath . 'Path'} 0 0 0
167  
168 # In case a confirm form is shown, we need it to POST on the
169 # current Path
170 0 $req->data->{confirmFormAction} = URI->new( $req->uri )->path;
171 }
172 else {
173 0 $restore_failed = 1;
174 0 $self->cleanAllPdata($req);
175 }
176 }
177  
178 0 ▶ if ( $restore_failed and !@path ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($restore_failed and not @path) 0 0 0
Condition0%0/3
$restore_failed and not @path
!ll&&!rl&&r
000
MC/DC0%0/2
$restore_failed and not @path
$restore_failed not @path
Truth table0%0/3
A and not(B)
A= $restore_failedB= not @path
ABresult
0X0
100
111
179 0 $self->logger->error("Unable to restore issuer context");
180 0 $req->mustRedirect(1);
181 0 return $self->p->doPE($req, PE_TOKENEXPIRED);
182 }
183  
184 # Clean pdata: keepPdata has been set, so pdata must be cleaned here
185 0 $self->logger->debug('Cleaning pdata');
186 0 $self->cleanPdata($req);
187  
188 0 ▶ $req->maybeNotBase64(1) if ( ref($self) =~ /::CAS$/ );
Branch: 1 branch
BranchTrueFalseTotal
if ref($self) =~ /::CAS$/ 0 0 0
189 0 $req->mustRedirect(1);
190 return $self->p->do(
191 $req,
192 [
193 'importHandlerData', 'controlUrl',
194 0 @{ $self->p->forAuthUser }, [ ref($self) . "::run", @path ],
195 ]
196 );
197 }
198  
199 sub cleanAllPdata {
200 0 ▶ my ( $self, $req ) = @_;
Subroutine cleanAllPdata: not called CC=3 SCAR=24.8
Pod undocumented
201 0 foreach my $k ( keys %{ $req->pdata } ) {
202 0 ▶ if ( exists $req->pdata->{ $k . 'Path' } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $req->pdata->{$k . 'Path'}) 0 0 0
203 0 $self->cleanPdata( $req, $k );
204 }
205 }
206 }
207  
208 sub cleanPdata {
209 0 ▶ my ( $self, $req, $path ) = @_;
Subroutine cleanPdata: not called CC=10 SCAR=47.0
Pod undocumented
210 0 ▶ $path ||= $self->ipath;
Condition0%0/3
$path ||= $self->ipath
l!l&&r!l&&!r
000
MC/DC0%0/2
$path ||= $self->ipath
$path $self->ipath
Truth table0%0/3
A ||= B
A= $pathB= $self->ipath
ABresult
1X1
011
000
211 0 for my $s ( $path, $path . 'Path' ) {
212 0 ▶ if ( $req->pdata->{$s} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($req->pdata->{$s}) 0 0 0
213 0 $self->logger->debug("Removing $s key from pdata");
214 0 delete $req->pdata->{$s};
215 }
216 }
217 0 ▶ if ( $req->pdata->{keepPdata} and ref $req->pdata->{keepPdata} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($req->pdata->{"keepPdata"} and ref $req->pdata->{"keepPdata"}) 0 0 0
Condition0%0/3
$req->pdata->{"keepPdata"} and ref $req->pdata->{"keepPdata"}
!ll&&!rl&&r
000
MC/DC0%0/2
$req->pdata->{"keepPdata"} and ref $req->pdata->{"keepPdata"}
$req->pdata->{"keepPdata"} ref $req->pdata->{"keepPdata"}
Truth table0%0/3
A and B
A= $req->pdata->{"keepPdata"}B= ref $req->pdata->{"keepPdata"}
ABresult
0X0
100
111
218 0 @{ $req->pdata->{keepPdata} } =
219 grep {
220 0 ▶ $_ ne $path
Branch: 2 branches
BranchTrueFalseTotal
$_ ne $path and $_ ne $path . 'Path' ? 1 : $self->logger->debug("Removing $_ from keepPdata") && 0 0 0 0
$_ ne $path . 'Path' ? : 0 0 0
Condition0%0/2
$self->logger->debug("Removing $_ from keepPdata") and 0
!ll
00
MC/DC0%0/1
$self->logger->debug("Removing $_ from keepPdata") and 0
$self->logger->debug("Removing $_ from keepPdata")
Truth table0%0/2
A
A= $self->logger->debug("Removing $_ from keepPdata")
Aresult
00
11
221 and $_ ne $path . 'Path'
222 ? 1
223 : ( $self->logger->debug("Removing $_ from keepPdata") and 0 )
224 0 } @{ $req->pdata->{keepPdata} };
225 delete $req->pdata->{keepPdata}
226 0 ▶ unless ( @{ $req->pdata->{keepPdata} } );
Branch: 1 branch
BranchTrueFalseTotal
unless @{$req->pdata->{"keepPdata"};} 0 0 0
227 }
228 }
229  
230 sub storeRequest {
231 9 ▶ my ( $self, $req ) = @_;
Subroutine storeRequest: called CC=5 SCAR=16.1
Pod undocumented
232 9 my $info = {};
233 9 $info->{content} = $req->content;
234 9 foreach ( keys %{ $req->env } ) {
235 183 ▶ next if $_ eq "psgi.errors";
Branch: 1 branch
BranchTrueFalseTotal
if $_ eq "psgi.errors" 0 183 183
236 183 ▶ next if $_ eq "psgi.input";
Branch: 1 branch
BranchTrueFalseTotal
if $_ eq "psgi.input" 1 182 183
237 182 ▶ $info->{$_} = $req->env->{$_} unless ( ref $req->env->{$_} );
Branch: 1 branch
BranchTrueFalseTotal
unless ref $req->env->{$_} 143 39 182
238 }
239 9 my $token = $self->_ott->createToken($info);
240 9 $self->logger->debug("Store issuer request as $token");
241 9 return $token;
242 }
243  
244 sub restoreRequest {
245 0 ▶ my ( $self, $req, $token ) = @_;
Subroutine restoreRequest: not called CC=6 SCAR=37.4
Pod undocumented
246 0 $self->logger->debug("Restore issuer request from $token");
247  
248 0 my $result = 0;
249 0 my $env = $self->_ott->getToken($token);
250 0 ▶ if ($env) {
Branch: 1 branch
BranchTrueFalseTotal
if ($env) 0 0 0
251 0 $result = 1;
252 0 $self->logger->debug("Restoring request from $token");
253 0 ▶ if ( my $c = delete $env->{content} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $c = delete $env->{"content"}) 0 0 0
254 0 $env->{'psgix.input.buffered'} = 0;
255 0 $env->{'psgi.input'} = IO::String->new($c);
256 }
257 0 $req->{env} = {};
258 0 foreach ( keys %$env ) {
259 $self->logger->debug(
260 0 ▶ "Restore $_" . ( ref $env->{$_} ? '' : "\t" . $env->{$_} ) );
Branch: 1 branch
BranchTrueFalseTotal
ref $env->{$_} ? : 0 0 0
261 0 ▶ $req->env->{$_} = $env->{$_} unless /^plack/;
Branch: 1 branch
BranchTrueFalseTotal
unless /^plack/ 0 0 0
262 }
263 }
264 0 $req->{uri} = uri_unescape( $req->env->{REQUEST_URI} );
265 0 $req->{uri} =~ s|^//+|/|g;
266 0 return $result;
267 }
268  
269 sub reAuth {
270 0 ▶ my ( $self, $req ) = @_;
Subroutine reAuth: not called CC=2 SCAR=17.9
Pod undocumented
271 0 my $cacheTag = $self->p->cacheTag;
272 $req->data->{customScript} =
273 qq'<script type="text/javascript" src="$self->{p}->{staticPrefix}/common/js/autoRenew.min.js?v=$cacheTag"></script>'
274 0 ▶ if ( $self->conf->{skipRenewConfirmation} );
Branch: 1 branch
BranchTrueFalseTotal
if $self->conf->{"skipRenewConfirmation"} 0 0 0
275  
276 0 my $portal_without_slash = $req->portal =~ s/\/+$//r;
277 $req->data->{_url} =
278 0 encode_base64( $portal_without_slash . $req->path_info, '' );
279 0 $req->pdata->{ $self->ipath } = $self->storeRequest($req);
280 0 push @{ $req->pdata->{keepPdata} }, $self->ipath, $self->ipath . 'Path';
281 0 $req->pdata->{issuerTs} = time;
282 0 return PE_RENEWSESSION;
283 }
284  
285 sub upgradeAuth {
286 0 ▶ my ( $self, $req ) = @_;
Subroutine upgradeAuth: not called CC=2 SCAR=17.9
Pod undocumented
287 0 my $cacheTag = $self->p->cacheTag;
288 $req->data->{customScript} =
289 qq'<script type="text/javascript" src="$self->{p}->{staticPrefix}/common/js/autoRenew.min.js?v=$cacheTag"></script>'
290 0 ▶ if ( $self->conf->{skipUpgradeConfirmation} );
Branch: 1 branch
BranchTrueFalseTotal
if $self->conf->{"skipUpgradeConfirmation"} 0 0 0
291 0 my $portal_without_slash = $req->portal =~ s/\/+$//r;
292 $req->data->{_url} =
293 0 encode_base64( $portal_without_slash . $req->path_info, '' );
294 0 $req->pdata->{ $self->ipath } = $self->storeRequest($req);
295 0 push @{ $req->pdata->{keepPdata} }, $self->ipath, $self->ipath . 'Path';
296 0 $req->pdata->{issuerTs} = time;
297 0 return PE_UPGRADESESSION;
298 }
299  
300 29 1;
301 __END__
302  
303 =pod
304  
305 =encoding utf8
306  
307 =head1 NAME
308  
309 Lemonldap::NG::Portal::Main::Issuer - Base class for identity providers.
310  
311 =head1 SYNOPSIS
312  
313 package Lemonldap::NG::Portal::Issuer::My;
314 use strict;
315 use Mouse;
316 extends 'Lemonldap::NG::Portal::Main::Issuer';
317 use Lemonldap::NG::Portal::Main::Constants qw(PE_OK);
318  
319 # Required: URL root path
320 use constant path => 'saml';
321
322 # Optional initialization method
323 sub init {
324 my ($self) = @_;
325 ...
326 # Must return 1 (succeed) or 0 (failure)
327 }
328
329 # Required methods are run() and logout(), they are launched only for
330 # authenticated users
331 # $req is a Lemonldap::NG::Portal::Main::Request object
332 # They must return a Lemonldap::NG::Portal::Main::Constants constant
333 sub run {
334 my ( $self, $req ) = @_
335 ...
336 return PE_OK
337 }
338
339 sub logout {
340 my ( $self, $req ) = @_
341 ...
342 return PE_OK
343 }
344 1;
345  
346 =head1 DESCRIPTION
347  
348 Lemonldap::NG::Portal::Main::Issuer is a base class to write identity providers
349 for Lemonldap::NG web-SSO system. It provide several methods to write easily
350 an IdP and manage authentication if the identity request comes before
351 authentication.
352  
353 =head1 WRITING AN IDENTITY PROVIDER
354  
355 To write a classic identity provider, you just have to inherit this class and
356 write run() and logout() methods. These methods must return a
357 Lemonldap::NG::Portal::Main::Constants constant.
358  
359 A classic identity provider needs a "issuerDBE<gt>XXXE<lt>Path" parameter in
360 LLNG configuration to declare its base URI path (see
361 L<Lemonldap::NG::Manager::Build>). Example: /saml/. All requests that starts
362 with /saml/ will call run() after authentication if needed, and no one else.
363  
364 The logout() function is called when user asks for logout on this server. If
365 you want to write an identity provider, you must implement a single logout
366 system.
367  
368 =head2 managing other URI path
369  
370 Lemonldap::NG::Portal::Main::Issuer provides methods to bind a method to an
371 URI path:
372  
373 =over
374  
375 =item addAuthRoute() for authenticated users
376  
377 =item addUnauthRoute() for unauthenticated users
378  
379 =back
380  
381 They must be called during initialization process (so you must write the
382 optional init() sub).
383  
384 Be careful with C<add*authRoute()>: you can't catch here your root path (=
385 path declared in C<$self-E<gt>path>) because it is caught by this module,
386 but you can catch sub-routes (ie C</path/something>).
387  
388 Example:
389  
390 sub init {
391 my ($self) = @_;
392 ...
393 $self->addUnauthRoute( saml => { soap => 'soapServer' }, [ 'POST' ] );
394 return 1;
395 }
396 sub soapServer {
397 my ( $self, $req ) = @_;
398 ...
399 # You must return a valid PSGI response
400 return [ 200, [ 'Content-Type' => 'application/xml' ], [] ];
401 }
402  
403 =head2 avoid conflicts in path
404  
405 If you share base URI path with another plugin (a C<Auth::*> module for
406 example), it is recommended to write a C<ssoMatch> function that returns true
407 if C<$req-E<gt>uri> has to be handled by Issuer module. See C<Issuer::SAML>
408 or C<Issuer::OpenIDConnect> to have some examples.
409  
410 =head1 SEE ALSO
411  
412 L<http://lemonldap-ng.org/>
413  
414 =head1 AUTHORS
415  
416 =over
417  
418 =item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
419  
420 =back
421  
422 =head1 BUG REPORT
423  
424 Use OW2 system to report bug or ask for features:
425 L<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
426  
427 =head1 DOWNLOAD
428  
429 Lemonldap::NG is available at
430 L<https://lemonldap-ng.org/download>
431  
432 =head1 COPYRIGHT AND LICENSE
433  
434 See COPYING file for details.
435  
436 This library is free software; you can redistribute it and/or modify
437 it under the terms of the GNU General Public License as published by
438 the Free Software Foundation; either version 2, or (at your option)
439 any later version.
440  
441 This program is distributed in the hope that it will be useful,
442 but WITHOUT ANY WARRANTY; without even the implied warranty of
443 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
444 GNU General Public License for more details.
445  
446 You should have received a copy of the GNU General Public License
447 along with this program. If not, see L<http://www.gnu.org/licenses/>.
448  
449 =cut
« blib/lib/Lemonldap/NG/Portal/2F/Yubikey.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Lib/WebAuthn.pm »