blib/lib/Lemonldap/NG/Portal/UserDB/Slave.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 42.5% 17 / 40 CC 3 SCAR 15.9
CC
3
Cov
45%
setSessionInfo
12.0
getUser
2.0
findUser
2.0
CRAP 4.9
« blib/lib/Lemonldap/NG/Portal/2F/Mail2F.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Auth/Remote.pm »
1 ## @file
2 # Slave userDB mechanism
3  
4 ## @class
5 # Slave userDB mechanism class
6 package Lemonldap::NG::Portal::UserDB::Slave;
7  
8 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use Lemonldap::NG::Portal::Main::Constants qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
12 PE_OK
13 PE_FORBIDDENIP
14 2 );
15  
16 2 our $VERSION = '2.19.0';
17  
18 2 extends qw(
19 Lemonldap::NG::Portal::Main::UserDB
20 Lemonldap::NG::Portal::Lib::Slave
21 );
22  
23 # INITIALIZATION
24  
25 1 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
26 1 return 1;
27 }
28  
29 # RUNNING METHODS
30  
31 0 ▶sub getUser {
Subroutine getUser: not called CC=1 SCAR=6.9
Pod undocumented
32 0 return PE_OK;
33 }
34  
35 0 ▶sub findUser {
Subroutine findUser: not called CC=1 SCAR=6.9
Pod undocumented
36 0 return PE_OK;
37 }
38  
39 # Search exportedVars values in HTTP headers.
40 0 ▶sub setSessionInfo {
Subroutine setSessionInfo: not called CC=3 SCAR=24.8
Pod undocumented
41 0 my ( $self, $req ) = @_;
42  
43 0 ▶ return PE_FORBIDDENIP
Branch: 1 branch
BranchTrueFalseTotal
unless $self->checkIP($req) 0 0 0
44 unless ( $self->checkIP($req) );
45  
46 my %vars = (
47 0 %{ $self->conf->{exportedVars} },
48 0 %{ $self->conf->{slaveExportedVars} }
49 );
50 0 ▶ while ( my ( $k, $v ) = each %vars ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %vars) 0 0 0
51 0 $v = 'HTTP_' . uc($v);
52 0 $v =~ s/\-/_/g;
53 0 $req->{sessionInfo}->{$k} = $req->{$v};
54 }
55 0 return PE_OK;
56 }
57  
58 2 1;
« blib/lib/Lemonldap/NG/Portal/2F/Mail2F.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Auth/Remote.pm »