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
dcoutadeur dcoutadeur
lemonldap-ng
Commits
3a669167
Commit
3a669167
authored
Nov 16, 2018
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temp
parent
642e98e1
Changes
160
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
205 additions
and
253 deletions
+205
-253
debian/control
debian/control
+2
-2
debian/tests/control
debian/tests/control
+3
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/Captcha.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Captcha.pm
+6
-12
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
+5
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
...p-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/AccessLib.pm
...nldap-ng-common/lib/Lemonldap/NG/Common/Conf/AccessLib.pm
+5
-5
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
...ldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
...p-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications.pm
+5
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
...ap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
+5
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/File.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/File.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
...ap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
+6
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
+11
-11
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
+3
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
+2
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
+9
-46
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/TOTP.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/TOTP.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
+4
-4
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
+3
-14
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
+1
-3
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Server.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Server.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Server/Nginx.pm
...nldap-ng-handler/lib/Lemonldap/NG/Handler/Server/Nginx.pm
+1
-1
lemonldap-ng-handler/t/test-psgi-lib.pm
lemonldap-ng-handler/t/test-psgi-lib.pm
+8
-6
lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/2ndFA.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/2ndFA.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+9
-9
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
+6
-7
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm
+6
-5
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Diff.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Diff.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
+12
-17
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
...ldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm
...-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/TOTP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/TOTP.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth.pod
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth.pod
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
+7
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Apache.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Apache.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/DBI.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/DBI.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LinkedIn.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LinkedIn.pm
+4
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Null.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Null.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
+4
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/PAM.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/PAM.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Proxy.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Proxy.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Remote.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Remote.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Slave.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Slave.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
+4
-3
No files found.
debian/control
View file @
3a669167
...
...
@@ -28,7 +28,7 @@ Build-Depends-Indep: libapache-session-perl,
libjson-perl,
liblasso-perl,
libmime-tools-perl,
libmo
use
-perl,
libmo
o
-perl,
libnet-cidr-lite-perl,
libnet-ldap-perl,
libnet-openid-consumer-perl,
...
...
@@ -197,7 +197,7 @@ Depends: ${misc:Depends},
libcrypt-rijndael-perl,
libhtml-template-perl,
libjson-perl,
libmo
use
-perl,
libmo
o
-perl,
libplack-perl,
liburi-perl,
libwww-perl
...
...
debian/tests/control
View file @
3a669167
# debian/tests/runner launch pkg-perl-autopkgtest tests for each library
Test-Command: ./debian/tests/runner build-deps
Depends: @, @builddeps@, pkg-perl-autopkgtest, libmo
use
-perl
Depends: @, @builddeps@, pkg-perl-autopkgtest, libmo
o
-perl
Test-Command: ./debian/tests/runner runtime-deps
Depends: @, pkg-perl-autopkgtest, libmo
use
-perl
Depends: @, pkg-perl-autopkgtest, libmo
o
-perl
# Use pkg-perl-autopkgtest test for runtime-deps-and-recommends
# Some portal suggested dependencies are added here
...
...
@@ -11,4 +11,4 @@ Test-Command: /usr/share/pkg-perl-autopkgtest/runner runtime-deps-and-recommends
Depends: @, @builddeps@, pkg-perl-autopkgtest, libyaml-perl, liblog-log4perl-perl, libauthen-pam-perl, libauthen-radius-perl, libweb-id-perl
#Test-Command: ./debian/tests/runner heavy-deps
#Depends: @, pkg-perl-autopkgtest, pkg-perl-autopkgtest-heavy, libmo
use
-perl
#Depends: @, pkg-perl-autopkgtest, pkg-perl-autopkgtest-heavy, libmo
o
-perl
lemonldap-ng-common/lib/Lemonldap/NG/Common/Captcha.pm
View file @
3a669167
...
...
@@ -10,27 +10,23 @@ our $VERSION = '2.0.0';
use
strict
;
use
Lemonldap::NG::Common::
Session
;
use
Mo
use
;
use
Mo
o
;
use
Digest::
MD5
qw(md5_hex)
;
has
'
storageModule
'
=>
(
is
=>
'
ro
',
isa
=>
'
Str
',
required
=>
1
,
);
has
'
storageModuleOptions
'
=>
(
is
=>
'
ro
',
isa
=>
'
HashRef|Undef
',
);
has
'
storageModuleOptions
'
=>
(
is
=>
'
ro
'
);
has
code
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
code
=>
(
is
=>
'
rw
'
);
has
md5
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
md5
=>
(
is
=>
'
rw
'
);
has
image
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
image
=>
(
is
=>
'
rw
'
);
has
size
=>
(
is
=>
'
ro
'
,
isa
=>
'
Int
'
);
has
size
=>
(
is
=>
'
ro
'
);
sub
BUILD
{
...
...
@@ -115,6 +111,4 @@ sub removeSession {
return
0
;
}
no
Mouse
;
1
;
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
View file @
3a669167
package
Lemonldap::NG::Common::
Cli
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::
Conf
;
our
$VERSION
=
'
2.0.0
';
has
confAccess
=>
(
is
=>
'
rw
',
builder
=>
sub
{
lazy
=>
1
,
builder
=>
1
,
);
sub
_build_confAccess
{
my
$res
=
Lemonldap::NG::Common::
Conf
->
new
(
{
(
...
...
@@ -21,11 +24,9 @@ has confAccess => (
die
$
Lemonldap::NG::Common::Conf::
msg
unless
(
$res
);
return
$res
;
},
);
has
cfgNum
=>
(
is
=>
'
rw
',
isa
=>
'
Int
',
);
sub
info
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
View file @
3a669167
package
Lemonldap::NG::Common::Combination::
Parser
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Safe
;
use
constant
PE_OK
=>
0
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/AccessLib.pm
View file @
3a669167
...
...
@@ -2,14 +2,14 @@ package Lemonldap::NG::Common::Conf::AccessLib;
use
5.10.0
;
use
utf8
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::
Conf
;
has
'
_confAcc
'
=>
(
is
=>
'
rw
',
is
a
=>
'
Lemonldap::NG::Common::Conf
'
);
has
'
configStorage
'
=>
(
is
=>
'
rw
',
isa
=>
'
HashRef
',
default
=>
sub
{
{}
}
);
has
'
currentConf
'
=>
(
is
=>
'
rw
',
required
=>
1
,
default
=>
sub
{
{}
}
);
has
'
protection
'
=>
(
is
=>
'
rw
',
is
a
=>
'
St
r
',
default
=>
'
manager
'
);
has
'
_confAcc
'
=>
(
is
=>
'
rw
'
);
has
'
configStorage
'
=>
(
is
=>
'
rw
',
default
=>
sub
{
{}
}
);
has
'
currentConf
'
=>
(
is
=>
'
rw
',
required
=>
1
,
default
=>
sub
{
{}
}
);
has
'
protection
'
=>
(
is
=>
'
r
w
',
default
=>
sub
{
'
manager
'
}
);
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
View file @
3a669167
package
Lemonldap::NG::Common::Conf::
Compact
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::Conf::
ReConstants
;
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
View file @
3a669167
...
...
@@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Conf::RESTServer;
use
strict
;
use
JSON
'
from_json
';
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::Conf::
Constants
;
use
Lemonldap::NG::Common::Conf::
ReConstants
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
View file @
3a669167
...
...
@@ -6,7 +6,7 @@
package
Lemonldap::NG::Common::Conf::SAML::
Metadata
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Crypt::OpenSSL::
RSA
;
use
Crypt::OpenSSL::
X509
;
use
HTML::
Template
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
View file @
3a669167
package
Lemonldap::NG::Common::
Module
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications.pm
View file @
3a669167
package
Lemonldap::NG::Common::
Notifications
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
our
$VERSION
=
'
2.0.0
';
...
...
@@ -20,7 +20,10 @@ sub import {
has
notifField
=>
(
is
=>
'
rw
',
builder
=>
sub
{
lazy
=>
1
,
builder
=>
1
,
);
sub
_build_notifField
{
my
$uid
=
$_
[
0
]
->
conf
->
{
notificationField
}
||
$_
[
0
]
->
conf
->
{
whatToTrace
}
...
...
@@ -28,7 +31,6 @@ has notifField => (
$uid
=~
s/^\$//
;
return
$uid
;
}
);
sub
getNotifications
{
my
(
$self
,
$uid
)
=
@_
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
View file @
3a669167
...
...
@@ -6,7 +6,7 @@
package
Lemonldap::NG::Common::Notifications::
DBI
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Time::
Local
;
use
DBI
;
use
Encode
;
...
...
@@ -40,13 +40,15 @@ has dbiUser => (
}
);
has
dbiPassword
=>
(
is
=>
'
ro
',
default
=>
''
);
has
dbiPassword
=>
(
is
=>
'
ro
',
default
=>
sub
{
''
}
);
# Database handle object
has
_dbh
=>
(
is
=>
'
rw
',
lazy
=>
1
,
builder
=>
sub
{
builder
=>
1
,
);
sub
_build__dbh
{
my
$self
=
shift
;
my
$r
=
DBI
->
connect_cached
(
$self
->
{
dbiChain
},
$self
->
{
dbiUser
},
...
...
@@ -55,7 +57,6 @@ has _dbh => (
$self
->
logger
->
error
(
$
DBI::
errstr
)
unless
(
$r
);
return
$r
;
}
);
# Current query
has
sth
=>
(
is
=>
'
rw
'
);
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/File.pm
View file @
3a669167
...
...
@@ -6,7 +6,7 @@
package
Lemonldap::NG::Common::Notifications::
File
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
MIME::
Base64
;
our
$VERSION
=
'
2.0.0
';
...
...
@@ -31,7 +31,7 @@ has table => (
}
);
has
fileNameSeparator
=>
(
is
=>
'
rw
',
default
=>
'
_
'
);
has
fileNameSeparator
=>
(
is
=>
'
rw
',
default
=>
sub
{
'
_
'
}
);
# Returns notifications corresponding to the user $uid.
# If $ref is set, returns only notification corresponding to this reference.
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
View file @
3a669167
package
Lemonldap::NG::Common::Notifications::
JSON
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
JSON
qw(from_json to_json)
;
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
View file @
3a669167
...
...
@@ -7,7 +7,7 @@
package
Lemonldap::NG::Common::Notifications::
LDAP
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Time::
Local
;
use
MIME::
Base64
;
use
Net::
LDAP
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
View file @
3a669167
package
Lemonldap::NG::Common::Notifications::
XML
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
XML::
LibXML
;
our
$VERSION
=
'
2.0.0
';
...
...
@@ -9,10 +9,13 @@ our $VERSION = '2.0.0';
# XML parser
has
parser
=>
(
is
=>
'
rw
',
builder
=>
sub
{
lazy
=>
1
,
builder
=>
1
,
);
sub
_build_parser
{
return
XML::
LibXML
->
new
();
}
);
# Check XML data and insert new notifications.
# @param $xml XML string containing notification
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
View file @
3a669167
package
Lemonldap::NG::Common::
PSGI
;
use
5.10.0
;
use
Mo
use
;
use
Mo
o
;
use
JSON
;
use
Lemonldap::NG::Common::PSGI::
Constants
;
use
Lemonldap::NG::Common::PSGI::
Request
;
...
...
@@ -12,16 +12,16 @@ our $_json = JSON->new->allow_nonref;
# PROPERTIES
has
error
=>
(
is
=>
'
rw
',
default
=>
''
);
has
languages
=>
(
is
=>
'
rw
',
isa
=>
'
Str
',
default
=>
'
en
'
);
has
logLevel
=>
(
is
=>
'
rw
',
isa
=>
'
Str
',
default
=>
'
info
'
);
has
portal
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
staticPrefix
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
templateDir
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
links
=>
(
is
=>
'
rw
'
,
isa
=>
'
ArrayRef
'
);
has
menuLinks
=>
(
is
=>
'
rw
'
,
isa
=>
'
ArrayRef
'
);
has
logger
=>
(
is
=>
'
rw
'
);
has
userLogger
=>
(
is
=>
'
rw
'
);
has
error
=>
(
is
=>
'
rw
',
default
=>
sub
{
''
}
);
has
languages
=>
(
is
=>
'
rw
',
default
=>
sub
{
'
en
'
}
);
has
logLevel
=>
(
is
=>
'
rw
',
default
=>
sub
{
'
info
'
}
);
has
portal
=>
(
is
=>
'
rw
'
);
has
staticPrefix
=>
(
is
=>
'
rw
'
);
has
templateDir
=>
(
is
=>
'
rw
'
);
has
links
=>
(
is
=>
'
rw
'
);
has
menuLinks
=>
(
is
=>
'
rw
'
);
has
logger
=>
(
is
=>
'
rw
'
);
has
userLogger
=>
(
is
=>
'
rw
'
);
# INITIALIZATION
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
View file @
3a669167
package
Lemonldap::NG::Common::PSGI::Cli::
Lib
;
use
JSON
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::
PSGI
;
our
$VERSION
=
'
2.0.0
';
has
iniFile
=>
(
is
=>
'
ro
'
,
isa
=>
'
Str
'
);
has
iniFile
=>
(
is
=>
'
ro
'
);
has
app
=>
(
is
=>
'
ro
'
,
isa
=>
'
CodeRef
'
);
has
app
=>
(
is
=>
'
ro
'
);
sub
_get
{
my
(
$self
,
$path
,
$query
)
=
@_
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
View file @
3a669167
...
...
@@ -2,7 +2,7 @@ package Lemonldap::NG::Common::PSGI::Request;
use
strict
;
use
5.14.0
;
use
Mo
use
;
use
Mo
o
;
use
JSON
;
use
Plack::
Request
;
use
URI::
Escape
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
View file @
3a669167
package
Lemonldap::NG::Common::PSGI::
Router
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::
PSGI
;
use
Lemonldap::NG::Common::PSGI::
Constants
;
...
...
@@ -11,10 +11,9 @@ extends 'Lemonldap::NG::Common::PSGI';
# Properties
has
'
routes
'
=>
(
is
=>
'
rw
',
isa
=>
'
HashRef
',
default
=>
sub
{
{
GET
=>
{},
POST
=>
{},
PUT
=>
{},
DELETE
=>
{}
}
}
);
has
'
defaultRoute
'
=>
(
is
=>
'
rw
',
default
=>
'
index.html
'
);
has
'
defaultRoute
'
=>
(
is
=>
'
rw
',
default
=>
sub
{
'
index.html
'
}
);
# Routes initialization
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
View file @
3a669167
...
...
@@ -10,71 +10,36 @@ our $VERSION = '2.0.0';
use
Lemonldap::NG::Common::Apache::
Session
;
# Workaround for another ModPerl/Mouse issue...
BEGIN
{
require
Mouse
;
my
$v
=
sprintf
(
"
%d.%03d%03d
",
(
$
Mouse::
VERSION
=~
/(\d+)/g
)
);
if
(
$v
<
2.005001
and
$
Lemonldap::NG::Handler::Apache2::Main::
VERSION
)
{
require
Moose
;
Moose
->
import
();
}
else
{
Mouse
->
import
();
}
}
use
Moo
;
has
'
id
'
=>
(
is
=>
'
rw
',
isa
=>
'
Str|Undef
',
);
has
'
id
'
=>
(
is
=>
'
rw
',
);
has
'
force
'
=>
(
is
=>
'
rw
',
isa
=>
'
Bool
',
default
=>
0
,
default
=>
sub
{
0
},
);
has
'
kind
'
=>
(
is
=>
'
rw
',
isa
=>
'
Str|Undef
',
);
has
'
kind
'
=>
(
is
=>
'
rw
',
);
has
'
data
'
=>
(
is
=>
'
rw
',
isa
=>
'
HashRef
',
default
=>
sub
{
{}
},
);
has
'
options
'
=>
(
is
=>
'
rw
',
isa
=>
'
HashRef
',
);
has
'
options
'
=>
(
is
=>
'
rw
',
);
has
'
storageModule
'
=>
(
is
=>
'
ro
',
isa
=>
'
Str
',
required
=>
1
,
);
has
'
storageModuleOptions
'
=>
(
is
=>
'
ro
',
isa
=>
'
HashRef|Undef
',
);
has
'
storageModuleOptions
'
=>
(
is
=>
'
ro
',
);
has
'
cacheModule
'
=>
(
is
=>
'
rw
',
isa
=>
'
Str|Undef
',
);
has
'
cacheModule
'
=>
(
is
=>
'
rw
',
);
has
'
cacheModuleOptions
'
=>
(
is
=>
'
rw
',
isa
=>
'
HashRef|Undef
',
);
has
'
cacheModuleOptions
'
=>
(
is
=>
'
rw
',
);
has
'
error
'
=>
(
is
=>
'
rw
',
isa
=>
'
Str|Undef
',
);
has
'
error
'
=>
(
is
=>
'
rw
',
);
has
info
=>
(
is
=>
'
rw
'
);
...
...
@@ -224,6 +189,4 @@ sub remove {
return
1
;
}
no
Mouse
;
1
;
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session/REST.pm
View file @
3a669167
package
Lemonldap::NG::Common::Session::
REST
;
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Common::Conf::
Constants
;
use
JSON
qw(from_json to_json)
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/TOTP.pm
View file @
3a669167
...
...
@@ -4,7 +4,7 @@ package Lemonldap::NG::Common::TOTP;
# <gryphon@cpan.org>
use
strict
;
use
Mo
use
;
use
Mo
o
;
use
Convert::
Base32
'
decode_base32
';
use
Digest::
HMAC_SHA1
'
hmac_sha1_hex
';
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
View file @
3a669167
package
Lemonldap::NG::Handler::Lib::
PSGI
;
#use 5.10.0;
use
Mo
use
;
use
Mo
o
;
#use Lemonldap::NG::Handler::Main qw(:jailSharedVars);
our
$VERSION
=
'
2.0.0
';
has
protection
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
rule
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
api
=>
(
is
=>
'
rw
'
,
isa
=>
'
Str
'
);
has
protection
=>
(
is
=>
'
rw
'
);
has
rule
=>
(
is
=>
'
rw
'
);
has
api
=>
(
is
=>
'
rw
'
);
## @method boolean init($args)
# Initalize main handler
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
View file @
3a669167
...
...
@@ -5,22 +5,11 @@ use strict;
use
Safe
;
use
Lemonldap::NG::Common::
Safelib
;
#link protected safe Safe object
# Workaround for another ModPerl/Mouse issue...
BEGIN
{
require
Mouse
;
my
$v
=
sprintf
(
"
%d.%03d%03d
",
(
$
Mouse::
VERSION
=~
/(\d+)/g
)
);
if
(
$v
<
2.005001
and
$
Lemonldap::NG::Handler::Apache2::Main::
VERSION
)
{
require
Moose
;
Moose
->
import
();
}
else
{
Mouse
->
import
();
}
}
use
Moo
;
has
customFunctions
=>
(
is
=>
'
rw
'
,
isa
=>
'
Maybe[Str]
'
);
has
customFunctions
=>
(
is
=>
'
rw
'
);
has
useSafeJail
=>
(
is
=>
'
rw
'
,
isa
=>
'
Maybe[Int]
'
);
has
useSafeJail
=>
(
is
=>
'
rw
'
);
has
jail
=>
(
is
=>
'
rw
'
);
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
View file @
3a669167
...
...
@@ -4,7 +4,7 @@
package
Lemonldap::NG::Handler::
PSGI
;
use
5.10.0
;
use
Mo
use
;
use
Mo
o
;
use
Lemonldap::NG::Handler::PSGI::
Main
;
extends
'
Lemonldap::NG::Handler::Lib::PSGI
',
'
Lemonldap::NG::Common::PSGI
';
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
View file @
3a669167
package
Lemonldap::NG::Handler::PSGI::
Router
;
use
5.10.0
;
use
Mo
use
;
use
Mo
o
;
require
Lemonldap::NG::Handler::PSGI::
Main
;
extends
'
Lemonldap::NG::Handler::Lib::PSGI
',
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
View file @
3a669167
package
Lemonldap::NG::Handler::PSGI::
Try
;