blib/lib/Lemonldap/NG/Manager/Conf/Zero.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond 50.0% 5 / 10 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 63.3% 19 / 30 CC 6 SCAR 18.0
CC
6
Cov
77%
zeroConf
6.9
BEGIN
1.0
CRAP 6.1
« blib/lib/Lemonldap/NG/Manager/Api/2F.pm ↑ Summary blib/lib/Lemonldap/NG/Manager/Attributes.pm »
1 package Lemonldap::NG::Manager::Conf::Zero;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = '2.23.0';
6  
7 1 ▶sub zeroConf {
Subroutine zeroConf: called CC=6 SCAR=19.3
Pod undocumented
8 1 my ( $domain, $sessionDir, $persistentSessionDir, $notificationDir,
9 $cacheDir )
10 = @_;
11 1 ▶ $domain ||= 'example.com';
Condition50%1/2
$domain ||= "example.com"
l!l
01
MC/DC0%0/1
$domain ||= "example.com"
$domain
Truth table50%1/2
A
A= $domain
Aresult
11
00
12 1 ▶ $sessionDir ||= '/var/lib/lemonldap-ng/sessions';
Condition50%1/2
$sessionDir ||= "/var/lib/lemonldap-ng/sessions"
l!l
01
MC/DC0%0/1
$sessionDir ||= "/var/lib/lemonldap-ng/sessions"
$sessionDir
Truth table50%1/2
A
A= $sessionDir
Aresult
11
00
13 1 ▶ $persistentSessionDir ||= '/var/lib/lemonldap-ng/psessions';
Condition50%1/2
$persistentSessionDir ||= "/var/lib/lemonldap-ng/psessions"
l!l
01
MC/DC0%0/1
$persistentSessionDir ||= "/var/lib/lemonldap-ng/psessions"
$persistentSessionDir
Truth table50%1/2
A
A= $persistentSessionDir
Aresult
11
00
14 1 ▶ $notificationDir ||= '/var/lib/lemonldap-ng/notifications';
Condition50%1/2
$notificationDir ||= "/var/lib/lemonldap-ng/notifications"
l!l
01
MC/DC0%0/1
$notificationDir ||= "/var/lib/lemonldap-ng/notifications"
$notificationDir
Truth table50%1/2
A
A= $notificationDir
Aresult
11
00
15 1 ▶ $cacheDir ||= '/var/cache/lemonldap-ng/';
Condition50%1/2
$cacheDir ||= "/var/cache/lemonldap-ng/"
l!l
01
MC/DC0%0/1
$cacheDir ||= "/var/cache/lemonldap-ng/"
$cacheDir
Truth table50%1/2
A
A= $cacheDir
Aresult
11
00
16 return {
17 1 'timeout' => 72000,
18 'loginHistoryEnabled' => 1,
19 'userDB' => 'Same',
20 'applicationList' => {
21 '2administration' => {
22 'manager' => {
23 'options' => {
24 'logo' => 'configure.png',
25 'name' => 'WebSSO Manager',
26 'display' => 'auto',
27 'uri' => "http://manager.$domain/manager.html",
28 'description' => 'Configure LemonLDAP::NG WebSSO'
29 },
30 'type' => 'application'
31 },
32 'sessions' => {
33 'type' => 'application',
34 'options' => {
35 'display' => 'auto',
36 'uri' => "http://manager.$domain/sessions.html",
37 'description' => 'Explore WebSSO sessions',
38 'logo' => 'database.png',
39 'name' => 'Sessions Explorer'
40 }
41 },
42 'catname' => 'Administration',
43 'notifications' => {
44 'type' => 'application',
45 'options' => {
46 'description' => 'Explore WebSSO notifications',
47 'uri' => "http://manager.$domain/notifications.html",
48 'display' => 'auto',
49 'logo' => 'database.png',
50 'name' => 'Notifications Explorer'
51 }
52 },
53 'type' => 'category'
54 },
55 '3documentation' => {
56 'type' => 'category',
57 'localdoc' => {
58 'options' => {
59 'description' =>
60 'Documentation supplied with LemonLDAP::NG',
61 'display' => 'on',
62 'uri' => "http://manager.$domain/doc/",
63 'name' => 'Local documentation',
64 'logo' => 'help.png'
65 },
66 'type' => 'application'
67 },
68 'officialwebsite' => {
69 'options' => {
70 'description' => 'Official LemonLDAP::NG Website',
71 'uri' => 'https://lemonldap-ng.org/',
72 'display' => 'on',
73 'logo' => 'network.png',
74 'name' => 'Official Website'
75 },
76 'type' => 'application'
77 },
78 'catname' => 'Documentation'
79 },
80 '1sample' => {
81 'test1' => {
82 'options' => {
83 'description' =>
84 'A simple application displaying authenticated user',
85 'uri' => "http://test1.$domain/",
86 'display' => 'auto',
87 'logo' => 'demo.png',
88 'name' => 'Application Test 1'
89 },
90 'type' => 'application'
91 },
92 'catname' => 'Sample applications',
93 'type' => 'category',
94 'test2' => {
95 'type' => 'application',
96 'options' => {
97 'description' =>
98 'The same simple application displaying authenticated user',
99 'uri' => "http://test2.$domain/",
100 'display' => 'auto',
101 'name' => 'Application Test 2',
102 'logo' => 'thumbnail.png'
103 }
104 }
105 }
106 },
107 'cfgNum' => 0,
108 'globalStorageOptions' => {
109 'Directory' => $sessionDir,
110 'generateModule' =>
111 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
112 'LockDirectory' => "$sessionDir/lock"
113 },
114 'macros' => {
115 '_whatToTrace' =>
116 '$_auth eq \'SAML\' ? lc($_user.\'@\'.$_idpConfKey) : $_auth eq \'OpenIDConnect\' ? lc($_user.\'@\'.$_oidc_OP) : lc($_user)',
117 'UA' => '$ENV{HTTP_USER_AGENT}'
118 },
119 'notificationStorageOptions' => {
120 'dirName' => $notificationDir
121 },
122 'authentication' => 'Demo',
123 'demoExportedVars' => {
124 'mail' => 'mail',
125 'cn' => 'cn',
126 'uid' => 'uid'
127 },
128 'domain' => $domain,
129 'globalStorage' => 'Apache::Session::File',
130 'passwordDB' => 'Demo',
131 'persistentStorage' => 'Apache::Session::File',
132 'persistentStorageOptions' => {
133 'Directory' => $persistentSessionDir,
134 'LockDirectory' => "$persistentSessionDir/lock"
135 },
136 'reloadUrls' => {},
137 'sessionDataToRemember' => {},
138 'notification' => 1,
139 'groups' => {},
140 'exportedHeaders' => {
141 "test1.$domain" => {
142 'Auth-User' => '$uid',
143 'Auth-Groups' => '$groups'
144 },
145 "test2.$domain" => {
146 'Auth-User' => '$uid',
147 'Auth-Groups' => '$groups'
148 }
149 },
150 'registerDB' => 'Demo',
151 'portal' => "http://auth.$domain/",
152 'notificationStorage' => 'File',
153 'locationRules' => {
154 "auth.$domain" => {
155 '(?#checkUser)^/checkuser' => 'inGroup("timelords")',
156 '(?#errors)^/lmerror/' => 'accept',
157 'default' => 'accept'
158 },
159 "test1.$domain" => {
160 'default' => 'accept',
161 '^/logout' => 'logout_sso'
162 },
163 "test2.$domain" => {
164 'default' => 'accept',
165 '^/logout' => 'logout_sso'
166 },
167 "manager.$domain" => {
168 'default' => 'inGroup("timelords") or $uid eq "rtyler"',
169 '(?#Configuration)^/(.*?\.(fcgi|psgi)/)?(manager\.html|confs|prx/|$)'
170 => 'inGroup("timelords")',
171 '(?#Sessions)/(.*?\.(fcgi|psgi)/)?sessions' =>
172 'inGroup("timelords") or $uid eq "rtyler"',
173 '(?#Notifications)/(.*?\.(fcgi|psgi)/)?notifications' =>
174 'inGroup("timelords") or $uid eq "rtyler"',
175 }
176 },
177 'whatToTrace' => '_whatToTrace',
178 'securedCookie' => 0,
179 'cookieName' => 'lemonldap',
180 'cfgAuthor' => 'The LemonLDAP::NG team',
181 'cfgDate' => '1627287638',
182 'cfgVersion' => $VERSION,
183 'exportedVars' => {},
184 'portalSkin' => 'bootstrap',
185 'portalSkinBackground' =>
186 '1280px-Cedar_Breaks_National_Monument_partially.jpg',
187 'localSessionStorage' => 'Cache::FileCache',
188 'localSessionStorageOptions' => {
189 'namespace' => 'lemonldap-ng-sessions',
190 'default_expires_in' => 600,
191 'directory_umask' => '007',
192 'cache_root' => "$cacheDir",
193 'cache_depth' => 3,
194 },
195 "oidcServiceIgnoreScopeForClaims" => 1,
196 "webauthnDefaultTransports" => "usb, nfc, ble, internal"
197 };
198 }
199  
200 2 1;
« blib/lib/Lemonldap/NG/Manager/Api/2F.pm ↑ Summary blib/lib/Lemonldap/NG/Manager/Attributes.pm »