Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maxime Besson
lemonldap-ng
Commits
c7b4eb50
Commit
c7b4eb50
authored
Feb 07, 2019
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy with new conf
parent
2532970b
Changes
185
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
217 additions
and
366 deletions
+217
-366
.perltidyrc
.perltidyrc
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
+1
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
+4
-8
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
+1
-2
lemonldap-ng-common/t/01-Common-Conf.t
lemonldap-ng-common/t/01-Common-Conf.t
+2
-4
lemonldap-ng-common/t/02-Common-Conf-File.t
lemonldap-ng-common/t/02-Common-Conf-File.t
+1
-2
lemonldap-ng-common/t/03-Common-Conf-CDBI.t
lemonldap-ng-common/t/03-Common-Conf-CDBI.t
+1
-2
lemonldap-ng-common/t/03-Common-Conf-RDBI.t
lemonldap-ng-common/t/03-Common-Conf-RDBI.t
+1
-2
lemonldap-ng-common/t/05-Common-Conf-LDAP.t
lemonldap-ng-common/t/05-Common-Conf-LDAP.t
+1
-2
lemonldap-ng-common/t/40-Common-Session.t
lemonldap-ng-common/t/40-Common-Session.t
+2
-4
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/AuthBasic.pm
...ldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/AuthBasic.pm
+1
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/CDA.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/CDA.pm
+1
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/DevOps.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/DevOps.pm
+1
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
+2
-4
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
+1
-2
lemonldap-ng-handler/t/05-Lemonldap-NG-Handler-Reload.t
lemonldap-ng-handler/t/05-Lemonldap-NG-Handler-Reload.t
+3
-6
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
+1
-2
lemonldap-ng-handler/t/test-psgi-lib.pm
lemonldap-ng-handler/t/test-psgi-lib.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
+30
-61
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+2
-4
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
...p-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/CTrees.pm
...nldap-ng-manager/lib/Lemonldap/NG/Manager/Build/CTrees.pm
+5
-10
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
+11
-22
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Diff.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Diff.pm
+2
-4
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
...ldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
+1
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
+1
-2
lemonldap-ng-manager/scripts/testConfBackend.pl
lemonldap-ng-manager/scripts/testConfBackend.pl
+2
-4
lemonldap-ng-manager/t/05-rest-api.t
lemonldap-ng-manager/t/05-rest-api.t
+1
-2
lemonldap-ng-manager/t/11-save-changed-conf-with-confirmation.t
...dap-ng-manager/t/11-save-changed-conf-with-confirmation.t
+1
-2
lemonldap-ng-manager/t/12-save-changed-conf.t
lemonldap-ng-manager/t/12-save-changed-conf.t
+1
-2
lemonldap-ng-manager/t/14-bad-changes-in-conf.t
lemonldap-ng-manager/t/14-bad-changes-in-conf.t
+1
-2
lemonldap-ng-manager/t/20-test-coverage.t
lemonldap-ng-manager/t/20-test-coverage.t
+2
-4
lemonldap-ng-manager/t/40-sessions.t
lemonldap-ng-manager/t/40-sessions.t
+5
-10
lemonldap-ng-manager/t/60-2ndfa.t
lemonldap-ng-manager/t/60-2ndfa.t
+7
-14
lemonldap-ng-manager/t/80-attributes.t
lemonldap-ng-manager/t/80-attributes.t
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
+2
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/GPG.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/GPG.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
+3
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDC.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDC.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
+59
-63
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
...ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
+6
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
+7
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm
...nldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
+3
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckState.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckState.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/History.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/History.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailPasswordReset.pm
...rtal/lib/Lemonldap/NG/Portal/Plugins/MailPasswordReset.pm
+2
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Register.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Register.pm
+2
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm
+2
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/StayConnected.pm
...g-portal/lib/Lemonldap/NG/Portal/Plugins/StayConnected.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/REST.pm
+1
-2
lemonldap-ng-portal/t/01-pdata.t
lemonldap-ng-portal/t/01-pdata.t
+1
-2
lemonldap-ng-portal/t/02-Password-Demo.t
lemonldap-ng-portal/t/02-Password-Demo.t
+1
-2
lemonldap-ng-portal/t/03-XSS-protection.t
lemonldap-ng-portal/t/03-XSS-protection.t
+1
-2
lemonldap-ng-portal/t/19-Auth-Null.t
lemonldap-ng-portal/t/19-Auth-Null.t
+1
-2
lemonldap-ng-portal/t/20-Auth-DBI-utf8.t
lemonldap-ng-portal/t/20-Auth-DBI-utf8.t
+1
-2
lemonldap-ng-portal/t/20-Auth-and-password-DBI-dynamic-hash.t
...nldap-ng-portal/t/20-Auth-and-password-DBI-dynamic-hash.t
+1
-2
No files found.
.perltidyrc
View file @
c7b4eb50
...
...
@@ -8,7 +8,7 @@
--
nobreak
-
before
-
all
-
operators
--
blanks
-
before
-
comments
--
nocuddled
-
else
--
maximum
-
line
-
length
=
79
--
maximum
-
line
-
length
=
80
--
paren
-
tightness
=
1
--
square
-
bracket
-
tightness
=
1
--
space
-
for
-
semicolon
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
View file @
c7b4eb50
...
...
@@ -9,9 +9,7 @@ our $VERSION = '2.0.0';
has
confAccess
=>
(
is
=>
'
rw
',
builder
=>
sub
{
my
$res
=
Lemonldap::NG::Common::
Conf
->
new
(
{
(
my
$res
=
Lemonldap::NG::Common::
Conf
->
new
(
{
(
ref
$_
[
0
]
&&
$_
[
0
]
->
{
iniFile
}
?
(
confFile
=>
$_
[
0
]
->
{
iniFile
}
)
:
()
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
View file @
c7b4eb50
...
...
@@ -13,8 +13,7 @@ has app => ( is => 'ro', isa => 'CodeRef' );
sub
_get
{
my
(
$self
,
$path
,
$query
)
=
@_
;
$query
//
=
'';
return
$self
->
app
->
(
{
return
$self
->
app
->
(
{
'
HTTP_ACCEPT
'
=>
'
application/json, text/plain, */*
',
'
SCRIPT_NAME
'
=>
'',
'
HTTP_ACCEPT_ENCODING
'
=>
'
gzip, deflate
',
...
...
@@ -39,8 +38,7 @@ sub _post {
my
(
$self
,
$path
,
$query
,
$body
,
$type
,
$len
)
=
@_
;
die
"
$body
must be a IO::Handle
"
unless
(
ref
(
$body
)
and
$body
->
can
('
read
')
);
return
$self
->
app
->
(
{
return
$self
->
app
->
(
{
'
HTTP_ACCEPT
'
=>
'
application/json, text/plain, */*
',
'
SCRIPT_NAME
'
=>
'',
'
HTTP_ACCEPT_ENCODING
'
=>
'
gzip, deflate
',
...
...
@@ -69,8 +67,7 @@ sub _put {
my
(
$self
,
$path
,
$query
,
$body
,
$type
,
$len
)
=
@_
;
die
"
$body
must be a IO::Handle
"
unless
(
ref
(
$body
)
and
$body
->
can
('
read
')
);
return
$self
->
app
->
(
{
return
$self
->
app
->
(
{
'
HTTP_ACCEPT
'
=>
'
application/json, text/plain, */*
',
'
SCRIPT_NAME
'
=>
'',
'
HTTP_ACCEPT_ENCODING
'
=>
'
gzip, deflate
',
...
...
@@ -97,8 +94,7 @@ sub _put {
sub
_del
{
my
(
$self
,
$path
,
$query
)
=
@_
;
return
$self
->
app
->
(
{
return
$self
->
app
->
(
{
'
HTTP_ACCEPT
'
=>
'
application/json, text/plain, */*
',
'
SCRIPT_NAME
'
=>
'',
'
HTTP_ACCEPT_ENCODING
'
=>
'
gzip, deflate
',
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
View file @
c7b4eb50
...
...
@@ -239,8 +239,7 @@ sub session {
sub
getApacheSession
{
my
(
$self
,
$mod
,
$id
,
$info
,
$force
)
=
@_
;
my
$apacheSession
=
Lemonldap::NG::Common::
Session
->
new
(
{
my
$apacheSession
=
Lemonldap::NG::Common::
Session
->
new
(
{
storageModule
=>
$mod
->
{
module
},
storageModuleOptions
=>
$mod
->
{
options
},
cacheModule
=>
...
...
lemonldap-ng-common/t/01-Common-Conf.t
View file @
c7b4eb50
...
...
@@ -17,8 +17,7 @@ my $h;
my
$inifile
=
"
lemonldap-ng.ini
";
my
$confsection
=
"
configuration
";
ok
(
(
ok
(
(
Lemonldap::NG::Common::
Conf
->
new
(
type
=>
'
bad
'
)
==
0
and
$
Lemonldap::NG::Common::Conf::
msg
=~
/Error: Unknown package Lemonldap::NG::Common::Conf::Backends::bad\.$/
...
...
@@ -28,8 +27,7 @@ ok(
$h
=
bless
{},
'
Lemonldap::NG::Common::Conf
';
ok
(
(
ok
(
(
%$h
=
(
%$h
,
%
{
$h
->
getLocalConf
(
$confsection
,
$inifile
,
0
)
}
)
and
exists
$h
->
{
localStorage
}
),
...
...
lemonldap-ng-common/t/02-Common-Conf-File.t
View file @
c7b4eb50
...
...
@@ -17,8 +17,7 @@ BEGIN { use_ok('Lemonldap::NG::Common::Conf') }
my
$h
;
ok
(
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
type
=>
'
File
',
dirName
=>
"
t/
",
}
...
...
lemonldap-ng-common/t/03-Common-Conf-CDBI.t
View file @
c7b4eb50
...
...
@@ -27,8 +27,7 @@ SKIP: {
my
$skipSQLite
=
0
;
ok
(
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
type
=>
'
CDBI
',
dbiChain
=>
"
DBI:SQLite:dbname=t/lmConf.sql
",
dbiUser
=>
'',
...
...
lemonldap-ng-common/t/03-Common-Conf-RDBI.t
View file @
c7b4eb50
...
...
@@ -27,8 +27,7 @@ SKIP: {
my
$skipSQLite
=
0
;
ok
(
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
type
=>
'
RDBI
',
dbiChain
=>
"
DBI:SQLite:dbname=t/lmConf.sql
",
dbiUser
=>
'',
...
...
lemonldap-ng-common/t/05-Common-Conf-LDAP.t
View file @
c7b4eb50
...
...
@@ -18,8 +18,7 @@ SKIP: {
use_ok
('
Lemonldap::NG::Common::Conf
');
my
$h
;
ok
(
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
$h
=
new
Lemonldap::NG::Common::
Conf
(
{
type
=>
'
LDAP
',
ldapServer
=>
'
ldap://localhost
',
ldapConfBase
=>
'
ou=conf,ou=websso,dc=example,dc=com
',
...
...
lemonldap-ng-common/t/40-Common-Session.t
View file @
c7b4eb50
...
...
@@ -23,8 +23,7 @@ my $sessionOptions = {
LockDirectory
=>
$dir
,
};
my
$session
=
Lemonldap::NG::Common::
Session
->
new
(
{
my
$session
=
Lemonldap::NG::Common::
Session
->
new
(
{
storageModule
=>
$sessionModule
,
storageModuleOptions
=>
$sessionOptions
,
kind
=>
"
TEST
",
...
...
@@ -43,8 +42,7 @@ use_ok('Lemonldap::NG::Common::Apache::Session::Generate::SHA256');
$sessionOptions
->
{
generateModule
}
=
"
Lemonldap::NG::Common::Apache::Session::Generate::SHA256
";
my
$session2
=
Lemonldap::NG::Common::
Session
->
new
(
{
my
$session2
=
Lemonldap::NG::Common::
Session
->
new
(
{
storageModule
=>
$sessionModule
,
storageModuleOptions
=>
$sessionOptions
,
kind
=>
"
TEST
",
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/AuthBasic.pm
View file @
c7b4eb50
...
...
@@ -161,8 +161,7 @@ our $_ua;
sub
ua
{
my
(
$class
)
=
@_
;
return
$_ua
if
(
$_ua
);
$_ua
=
Lemonldap::NG::Common::
UserAgent
->
new
(
{
$_ua
=
Lemonldap::NG::Common::
UserAgent
->
new
(
{
lwpOpts
=>
$class
->
localConfig
->
{
lwpOpts
},
lwpSslOpts
=>
$class
->
localConfig
->
{
lwpSslOpts
}
}
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/CDA.pm
View file @
c7b4eb50
...
...
@@ -59,8 +59,7 @@ sub getCDAInfos {
my
$infos
=
{};
# Get the session
my
$cdaSession
=
Lemonldap::NG::Common::
Session
->
new
(
{
my
$cdaSession
=
Lemonldap::NG::Common::
Session
->
new
(
{
storageModule
=>
$class
->
tsv
->
{
sessionStorageModule
},
storageModuleOptions
=>
$class
->
tsv
->
{
sessionStorageOptions
},
cacheModule
=>
$class
->
tsv
->
{
sessionCacheModule
},
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/DevOps.pm
View file @
c7b4eb50
...
...
@@ -37,8 +37,7 @@ sub loadVhostConfig {
my
$json
;
if
(
$class
->
tsv
->
{
useSafeJail
}
)
{
my
$rUrl
=
$req
->
{
env
}
->
{
RULES_URL
}
||
(
(
||
(
(
$class
->
localConfig
->
{
loopBackUrl
}
||
"
http://127.0.0.1:
"
.
$req
->
{
env
}
->
{
SERVER_PORT
}
)
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
View file @
c7b4eb50
...
...
@@ -178,8 +178,7 @@ sub configReload {
sub
jailInit
{
my
(
$class
,
$conf
)
=
@_
;
$class
->
tsv
->
{
jail
}
=
Lemonldap::NG::Handler::Main::
Jail
->
new
(
{
$class
->
tsv
->
{
jail
}
=
Lemonldap::NG::Handler::Main::
Jail
->
new
(
{
useSafeJail
=>
$conf
->
{
useSafeJail
},
customFunctions
=>
$conf
->
{
customFunctions
},
}
...
...
@@ -193,8 +192,7 @@ sub jailInit {
sub
defaultValuesInit
{
my
(
$class
,
$conf
)
=
@_
;
$class
->
tsv
->
{
$_
}
=
$conf
->
{
$_
}
foreach
(
qw(
$class
->
tsv
->
{
$_
}
=
$conf
->
{
$_
}
foreach
(
qw(
cookieExpiration cookieName customFunctions httpOnly
securedCookie timeout timeoutActivity
timeoutActivityInterval useRedirectOnError useRedirectOnForbidden
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
View file @
c7b4eb50
...
...
@@ -446,8 +446,7 @@ sub retrieveSession {
# 2. Get the session from cache or backend
my
$session
=
$req
->
data
->
{
session
}
=
(
Lemonldap::NG::Common::
Session
->
new
(
{
Lemonldap::NG::Common::
Session
->
new
(
{
storageModule
=>
$class
->
tsv
->
{
sessionStorageModule
},
storageModuleOptions
=>
$class
->
tsv
->
{
sessionStorageOptions
},
cacheModule
=>
$class
->
tsv
->
{
sessionCacheModule
},
...
...
lemonldap-ng-handler/t/05-Lemonldap-NG-Handler-Reload.t
View file @
c7b4eb50
...
...
@@ -30,8 +30,7 @@ eval { Lemonldap::NG::Handler::Main->logLevelInit('error') };
ok
(
!
$@
,
'
logLevelInit
'
);
ok
(
Lemonldap::NG::Handler::
Main
->
jailInit
(
{
Lemonldap::NG::Handler::
Main
->
jailInit
(
{
https
=>
0
,
port
=>
0
,
maintenance
=>
0
,
...
...
@@ -51,8 +50,7 @@ ok(
);
ok
(
Lemonldap::NG::Handler::
Main
->
defaultValuesInit
(
{
Lemonldap::NG::Handler::
Main
->
defaultValuesInit
(
{
https
=>
0
,
port
=>
0
,
maintenance
=>
0
,
...
...
@@ -72,8 +70,7 @@ ok(
);
ok
(
Lemonldap::NG::Handler::
Main
->
locationRulesInit
(
{
Lemonldap::NG::Handler::
Main
->
locationRulesInit
(
{
'
locationRules
'
=>
{
'
www1
'
=>
{
'
default
'
=>
'
accept
',
...
...
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
View file @
c7b4eb50
...
...
@@ -13,8 +13,7 @@ ok( $app = module( Lemonldap::NG::Handler::PSGI::Try->new() ), 'New object' );
init
();
ok
(
$app
->
init
(
{
$app
->
init
(
{
configStorage
=>
{
type
=>
'
File
',
dirName
=>
'
t
'
},
localSessionStorage
=>
'',
logLevel
=>
'
warn
',
...
...
lemonldap-ng-handler/t/test-psgi-lib.pm
View file @
c7b4eb50
...
...
@@ -105,8 +105,7 @@ sub _get {
my
(
$self
,
$path
,
$query
,
$host
,
$cookie
,
%custom
)
=
@_
;
$query
//
=
'';
$host
||=
'
test1.example.com
';
return
$self
->
app
->
(
{
return
$self
->
app
->
(
{
'
HTTP_ACCEPT
'
=>
'
text/html
',
'
SCRIPT_NAME
'
=>
'
lmAuth
',
'
SERVER_NAME
'
=>
'
127.0.0.1
',
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
View file @
c7b4eb50
...
...
@@ -274,9 +274,7 @@ sub attributes {
'
authChoiceModules
'
=>
{
'
keyMsgFail
'
=>
'
__badChoiceKey__
',
'
keyTest
'
=>
qr/^(\d*)?[a-zA-Z0-9_]+$/
,
'
select
'
=>
[
[
{
'
select
'
=>
[
[
{
'
k
'
=>
'
Apache
',
'
v
'
=>
'
Apache
'
},
...
...
@@ -373,8 +371,7 @@ sub attributes {
'
v
'
=>
'
customModule
'
}
],
[
{
[
{
'
k
'
=>
'
AD
',
'
v
'
=>
'
Active Directory
'
},
...
...
@@ -439,8 +436,7 @@ sub attributes {
'
v
'
=>
'
customModule
'
}
],
[
{
[
{
'
k
'
=>
'
AD
',
'
v
'
=>
'
Active Directory
'
},
...
...
@@ -481,8 +477,7 @@ sub attributes {
},
'
authentication
'
=>
{
'
default
'
=>
'
Demo
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
Apache
',
'
v
'
=>
'
Apache
'
},
...
...
@@ -637,8 +632,7 @@ sub attributes {
},
'
casAccessControlPolicy
'
=>
{
'
default
'
=>
'
none
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
none
',
'
v
'
=>
'
None
'
},
...
...
@@ -782,8 +776,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
combModules
'
=>
{
'
keyTest
'
=>
qr/^\w+$/
,
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
Apache
',
'
v
'
=>
'
Apache
'
},
...
...
@@ -886,8 +879,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
confirmFormMethod
'
=>
{
'
default
'
=>
'
post
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
get
',
'
v
'
=>
'
GET
'
},
...
...
@@ -1185,8 +1177,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
infoFormMethod
'
=>
{
'
default
'
=>
'
get
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
get
',
'
v
'
=>
'
GET
'
},
...
...
@@ -1392,8 +1383,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
},
'
ldapSearchDeref
'
=>
{
'
default
'
=>
'
find
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
never
',
'
v
'
=>
'
never
'
},
...
...
@@ -1750,8 +1740,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
oidcOPMetaDataOptionsDisplay
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -1805,8 +1794,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
oidcOPMetaDataOptionsTokenEndpointAuthMethod
'
=>
{
'
default
'
=>
'
client_secret_post
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
client_secret_post
',
'
v
'
=>
'
client_secret_post
'
},
...
...
@@ -1872,8 +1860,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
oidcRPMetaDataOptionsIDTokenSignAlg
'
=>
{
'
default
'
=>
'
HS512
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
none
',
'
v
'
=>
'
None
'
},
...
...
@@ -1910,8 +1897,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
oidcRPMetaDataOptionsLogoutType
'
=>
{
'
default
'
=>
'
front
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
front
',
'
v
'
=>
'
Front Channel
'
},
...
...
@@ -2108,8 +2094,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
passwordDB
'
=>
{
'
default
'
=>
'
Demo
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
AD
',
'
v
'
=>
'
Active Directory
'
},
...
...
@@ -2235,8 +2220,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
portalSkin
'
=>
{
'
default
'
=>
'
bootstrap
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
bootstrap
',
'
v
'
=>
'
Bootstrap
'
}
...
...
@@ -2244,8 +2228,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'
type
'
=>
'
portalskin
'
},
'
portalSkinBackground
'
=>
{
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
'
None
'
},
...
...
@@ -2347,8 +2330,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
redirectFormMethod
'
=>
{
'
default
'
=>
'
get
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
get
',
'
v
'
=>
'
GET
'
},
...
...
@@ -2364,8 +2346,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'
registerDB
'
=>
{
'
default
'
=>
'
Null
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
AD
',
'
v
'
=>
'
Active Directory
'
},
...
...
@@ -2596,8 +2577,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlIDPMetaDataOptionsEncryptionMode
'
=>
{
'
default
'
=>
'
none
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
none
',
'
v
'
=>
'
None
'
},
...
...
@@ -2629,8 +2609,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlIDPMetaDataOptionsNameIDFormat
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -2679,8 +2658,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlIDPMetaDataOptionsRequestedAuthnContext
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -2717,8 +2695,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlIDPMetaDataOptionsSLOBinding
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -2739,8 +2716,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlIDPMetaDataOptionsSSOBinding
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -2898,8 +2874,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlServiceSignatureMethod
'
=>
{
'
default
'
=>
'
RSA_SHA1
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
RSA_SHA1
',
'
v
'
=>
'
RSA SHA1
'
},
...
...
@@ -2944,8 +2919,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlSPMetaDataOptionsEncryptionMode
'
=>
{
'
default
'
=>
'
none
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
none
',
'
v
'
=>
'
None
'
},
...
...
@@ -2966,8 +2940,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
samlSPMetaDataOptionsNameIDFormat
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
''
},
...
...
@@ -3100,8 +3073,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'
securedCookie
'
=>
{
'
default
'
=>
0
,
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
0
',
'
v
'
=>
'
unsecuredCookie
'
},
...
...
@@ -3221,8 +3193,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
},
'
SMTPTLS
'
=>
{
'
default
'
=>
'',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'',
'
v
'
=>
'
none
'
},
...
...
@@ -3400,8 +3371,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
},
'
userDB
'
=>
{
'
default
'
=>
'
Same
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
Same
',
'
v
'
=>
'
Same
'
},
...
...
@@ -3483,8 +3453,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
},
'
vhostType
'
=>
{
'
default
'
=>
'
Main
',
'
select
'
=>
[
{
'
select
'
=>
[
{
'
k
'
=>
'
Main
',
'
v
'
=>
'
Main
'
},
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
View file @
c7b4eb50
...
...
@@ -269,8 +269,7 @@ $defaultAttr}
foreach
(
@simpleHashKeys
,
@doubleHashKeys
,
sort
keys
%cnodesRe
)
{
$ra
->
add
(
$_
);
}
foreach
(
qw(
foreach
(
qw(
exportedHeaders locationRules post vhostOptions
samlIDPMetaDataXML samlIDPMetaDataExportedAttributes
samlIDPMetaDataOptions samlSPMetaDataXML
...
...
@@ -462,8 +461,7 @@ sub scanTree {
$jleaf
->
{"
_
$n
"}
=
[]
;
$self
->
scanTree
(
$leaf
->
{
$n
},
$jleaf
->
{"
_
$n
"},
$prefix
,
"
$path
.
$nodeName
\
[
$ord
\
]
"
);