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

filter: Statementstmt 46.4% 13 / 28 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 39.5% 17 / 43 CC 4 SCAR 21.7
CC
4
Cov
41%
setSessionInfo
20.0
getUser
2.0
findUser
2.0
CRAP 8.8
« blib/lib/Lemonldap/NG/Portal/UserDB/AD.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/2F/Ext2F.pm »
1 package Lemonldap::NG::Portal::UserDB::CAS;
2  
3 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 14 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 14 use Lemonldap::NG::Portal::Main::Constants qw(
6 PE_ERROR
7 PE_OK
8 14 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 14 our $VERSION = '2.19.0';
11  
12 14 extends 'Lemonldap::NG::Portal::Main::UserDB';
13  
14 # INITIALIZATION
15  
16 sub init {
17 13 ▶ return 1;
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
18 }
19  
20 # RUNNING METHODS
21  
22 sub getUser {
23 0 ▶ my ( $self, $req ) = @_;
Subroutine getUser: not called CC=1 SCAR=6.9
Pod undocumented
24 0 return PE_OK;
25 }
26  
27 sub findUser {
28 0 ▶ my ( $self, $req ) = @_;
Subroutine findUser: not called CC=1 SCAR=6.9
Pod undocumented
29  
30 # Nothing to do here
31 0 return PE_OK;
32 }
33  
34 # Get all required attributes
35 sub setSessionInfo {
36 0 ▶ my ( $self, $req ) = @_;
Subroutine setSessionInfo: not called CC=4 SCAR=30.0
Pod undocumented
37 0 my $srv;
38 0 ▶ unless ( $srv = $req->data->{_casSrvCurrent} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($srv = $req->data->{"_casSrvCurrent"}) 0 0 0
39 0 $self->logger->error('UserDB::CAS must be used with Auth::CAS');
40 0 return PE_ERROR;
41 }
42 my %ev = (
43 0 ▶ %{ $self->conf->{casSrvMetaDataExportedVars}->{$srv} || {} },
Branch: 1 branch
BranchTrueFalseTotal
$self->conf->{"casSrvMetaDataExportedVars"}{$srv} or {} 0 0 0
44 0 %{ $self->conf->{exportedVars} }
45 );
46 0 foreach ( keys %ev ) {
47 0 $req->{sessionInfo}->{$_} = $req->data->{casAttrs}->{$_};
48 }
49  
50 0 return PE_OK;
51 }
52  
53 14 1;
« blib/lib/Lemonldap/NG/Portal/UserDB/AD.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/2F/Ext2F.pm »