Lemonldap/NG/Handler/Server.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 2 totaltotal 88.5% 31 / 35 CC 2 SCAR 2.3
CC
2
Cov
96%
__ANON__
2.0
_run
1.0
BEGIN
1.0
CRAP 1.3
« Lemonldap/NG/Handler/PSGI/Router.pm ↑ Summary Lemonldap/NG/Handler/Lib/Fail.pm »
1 # LLNG platform class for FastCGI handler (Nginx)
2 #
3 # See https://lemonldap-ng.org/documentation/latest/handlerarch
4 package Lemonldap::NG::Handler::Server;
5  
6 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 9 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use Lemonldap::NG::Handler::Server::Main;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 our $VERSION = '2.17.0';
11  
12 9 extends 'Lemonldap::NG::Handler::PSGI';
13  
14 18 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
15 18 my $self = shift;
16 18 $self->api('Lemonldap::NG::Handler::Server::Main');
17 18 my $tmp = $self->SUPER::init(@_);
18 }
19  
20 ## @method void _run()
21 # Return subroutine that add headers stored in $req->{respHeaders} in
22 # response returned by handler()
23 #
24 9 ▶sub _run {
Subroutine _run: called CC=1 SCAR=0.0
25 9 my ($self) = @_;
26 return $self->psgiAdapter(
27 50 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
28 50 my $req = $_[0];
29 50 my $res = $self->_authAndTrace($req);
30 50 ▶ push @{ $res->[1] }, $req->spliceHdrs,
Condition50%1/2
$req->{"Cookie"} // ""
l!l
050
MC/DC0%0/1
$req->{"Cookie"} // ""
$req->{"Cookie"}
Truth table50%1/2
A
A= $req->{"Cookie"}
Aresult
11
00
31 50 Cookie => ( $req->{Cookie} // '' );
32 50 return $res;
33 }
34 9 );
35 }
36  
37 ## @method PSGI-Response handler($req)
38 # If PSGI is used as an authentication FastCGI only, this method will be
39 # called for authenticated users and returns only 200. Headers are set by
40 # Lemonldap::NG::Handler::PSGI.
41 # @param $req Lemonldap::NG::Common::PSGI::Request
42 21 ▶sub handler {
Subroutine handler: called CC=1 SCAR=0.0
Pod undocumented
43 21 return [ 200, [ 'Content-Length', 0 ], [] ];
44 }
45  
46 9 1;
« Lemonldap/NG/Handler/PSGI/Router.pm ↑ Summary Lemonldap/NG/Handler/Lib/Fail.pm »