Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
deb28bc9
Commit
deb28bc9
authored
Feb 15, 2017
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace lmLog by logger-> (
#857
)
parent
b7d4dac6
Changes
124
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
124 changed files
with
1619 additions
and
7175 deletions
+1619
-7175
lemonldap-ng-common/MANIFEST
lemonldap-ng-common/MANIFEST
+1
-0
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/File.pm
...p-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/File.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
...ldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
+8
-8
lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Apache2.pm
...nldap-ng-common/lib/Lemonldap/NG/Common/Logger/Apache2.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Syslog.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Syslog.pm
+1
-1
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
+3
-5
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
...ap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
+11
-10
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
+7
-9
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
+10
-9
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
...ap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
+7
-9
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
+3
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
+4
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
+1
-2
lemonldap-ng-common/t/50-Combination-Parser.t
lemonldap-ng-common/t/50-Combination-Parser.t
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
...dap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
+0
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/AuthBasic.pm
...ldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/AuthBasic.pm
+4
-7
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
+7
-7
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/SecureToken.pm
...ap-ng-handler/lib/Lemonldap/NG/Handler/Lib/SecureToken.pm
+15
-17
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/ZimbraPreAuth.pm
...-ng-handler/lib/Lemonldap/NG/Handler/Lib/ZimbraPreAuth.pm
+12
-13
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
+4
-3
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
+29
-43
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
+47
-61
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
+3
-3
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Main.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Main.pm
+3
-4
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
+4
-5
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/10-Lemonldap-NG-Handler-SharedConf.t
lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t
+1
-1
lemonldap-ng-handler/t/12-Lemonldap-NG-Handler-Jail.t
lemonldap-ng-handler/t/12-Lemonldap-NG-Handler-Jail.t
+14
-8
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
+1
-1
lemonldap-ng-handler/t/test.pm
lemonldap-ng-handler/t/test.pm
+3
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
+9
-7
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/CTrees.pm
...nldap-ng-manager/lib/Lemonldap/NG/Manager/Build/CTrees.pm
+2
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
+3
-5
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
+2
-2
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
...ldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
+9
-9
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
+1
-1
lemonldap-ng-manager/t/15-combination.t
lemonldap-ng-manager/t/15-combination.t
+8
-3
lemonldap-ng-portal/MANIFEST
lemonldap-ng-portal/MANIFEST
+0
-5
lemonldap-ng-portal/example/soapconfigtest.pl
lemonldap-ng-portal/example/soapconfigtest.pl
+1
-2
lemonldap-ng-portal/example/soaptest.pl
lemonldap-ng-portal/example/soaptest.pl
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm
+3
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Apache.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Apache.pm
+1
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Base.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Base.pm
+32
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
+18
-19
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
+2
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
+7
-9
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
+9
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
+36
-39
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
+10
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
+156
-202
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Slave.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Slave.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
+16
-21
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/WebID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/WebID.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Yubikey.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Yubikey.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/_WebForm.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/_WebForm.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDC.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDC.pm
+12
-16
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Display.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Display.pm
+0
-341
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
+92
-126
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/Get.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/Get.pm
+8
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenID.pm
+11
-12
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
...ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
+119
-151
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
+179
-216
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
+17
-20
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Choice.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Choice.pm
+10
-14
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/DBI.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/DBI.pm
+6
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/LDAP.pm
+8
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
+29
-34
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm
...-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm
+12
-15
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/XML.pm
...g-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/XML.pm
+15
-18
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/SREG.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/SREG.pm
+15
-17
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/Server.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/Server.pm
+2
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
+90
-107
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/RESTProxy.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/RESTProxy.pm
+15
-17
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
+159
-177
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SMTP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SMTP.pm
+8
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SOAPProxy.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SOAPProxy.pm
+5
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
+12
-17
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
+15
-19
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm
+13
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Menu.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Menu.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugins.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugins.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
+26
-35
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
+29
-31
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm
+0
-553
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/Base.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/Base.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/DBI.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/DBI.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/LDAP.pm
+4
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CDA.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CDA.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ForceAuth.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ForceAuth.pm
+3
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm
+17
-19
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm
+10
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Register.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Register.pm
+20
-29
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm
+10
-11
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Status.pm
...nldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Status.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/U2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/U2F.pm
+4
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/AD.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/AD.pm
+5
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/LDAP.pm
+5
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/U2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/U2F.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm
+0
-3234
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/DBI.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/DBI.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/Facebook.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/Facebook.pm
+2
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/LDAP.pm
+4
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/OpenID.pm
+4
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/OpenIDConnect.pm
...ng-portal/lib/Lemonldap/NG/Portal/UserDB/OpenIDConnect.pm
+8
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/SAML.pm
+17
-23
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/WebID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/WebID.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Multi.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Multi.pm
+0
-190
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm
+0
-963
lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-Artifact-with-SOAP-SLO.t
...portal/t/30-Auth-and-issuer-SAML-Artifact-with-SOAP-SLO.t
+4
-3
lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-Metadata.t
lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-Metadata.t
+2
-2
lemonldap-ng-portal/t/33-Auth-and-issuer-OpenID2.t
lemonldap-ng-portal/t/33-Auth-and-issuer-OpenID2.t
+1
-1
lemonldap-ng-portal/t/40-Notifications-JSON-DBI.t
lemonldap-ng-portal/t/40-Notifications-JSON-DBI.t
+1
-1
lemonldap-ng-portal/t/40-Notifications-XML-DBI.t
lemonldap-ng-portal/t/40-Notifications-XML-DBI.t
+1
-1
lemonldap-ng-portal/t/41-Token.t
lemonldap-ng-portal/t/41-Token.t
+5
-2
No files found.
lemonldap-ng-common/MANIFEST
View file @
deb28bc9
...
@@ -35,6 +35,7 @@ lib/Lemonldap/NG/Common/Crypto.pm
...
@@ -35,6 +35,7 @@ lib/Lemonldap/NG/Common/Crypto.pm
lib/Lemonldap/NG/Common/FormEncode.pm
lib/Lemonldap/NG/Common/FormEncode.pm
lib/Lemonldap/NG/Common/Logger/Apache2.pm
lib/Lemonldap/NG/Common/Logger/Apache2.pm
lib/Lemonldap/NG/Common/Logger/Std.pm
lib/Lemonldap/NG/Common/Logger/Std.pm
lib/Lemonldap/NG/Common/Logger/Syslog.pm
lib/Lemonldap/NG/Common/Module.pm
lib/Lemonldap/NG/Common/Module.pm
lib/Lemonldap/NG/Common/Notifications.pm
lib/Lemonldap/NG/Common/Notifications.pm
lib/Lemonldap/NG/Common/Notifications/DBI.pm
lib/Lemonldap/NG/Common/Notifications/DBI.pm
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
View file @
deb28bc9
...
@@ -173,7 +173,7 @@ sub getConf {
...
@@ -173,7 +173,7 @@ sub getConf {
unless
(
ref
(
$self
->
{
refLocalStorage
}
)
)
{
unless
(
ref
(
$self
->
{
refLocalStorage
}
)
)
{
$msg
.=
"
Get remote configuration (localStorage unavailable).
\n
";
$msg
.=
"
Get remote configuration (localStorage unavailable).
\n
";
$r
=
$self
->
getDBConf
(
$args
);
$r
=
$self
->
getDBConf
(
$args
);
return
undef
unless
(
$r
->
{
cfgNum
}
);
return
undef
unless
(
$r
->
{
cfgNum
}
);
$self
->
setDefault
(
$r
,
$args
->
{
localPrm
}
);
$self
->
setDefault
(
$r
,
$args
->
{
localPrm
}
);
$self
->
compactConf
(
$r
);
$self
->
compactConf
(
$r
);
}
}
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/File.pm
View file @
deb28bc9
...
@@ -96,14 +96,14 @@ sub store {
...
@@ -96,14 +96,14 @@ sub store {
sub
load
{
sub
load
{
my
(
$self
,
$cfgNum
,
$fields
)
=
@_
;
my
(
$self
,
$cfgNum
,
$fields
)
=
@_
;
my
(
$f
,
$filename
);
my
(
$f
,
$filename
);
if
(
-
e
$self
->
_file
(
$cfgNum
)
)
{
if
(
-
e
$self
->
_file
(
$cfgNum
)
)
{
$filename
=
$self
->
_file
(
$cfgNum
);
$filename
=
$self
->
_file
(
$cfgNum
);
}
}
elsif
(
-
e
"
$self
->{dirName}/lmConf-
$cfgNum
.js
"
)
{
elsif
(
-
e
"
$self
->{dirName}/lmConf-
$cfgNum
.js
"
)
{
$filename
=
"
$self
->{dirName}/lmConf-
$cfgNum
.js
";
$filename
=
"
$self
->{dirName}/lmConf-
$cfgNum
.js
";
}
}
if
(
$filename
)
{
if
(
$filename
)
{
local
$/
=
'';
local
$/
=
'';
my
$ret
;
my
$ret
;
unless
(
open
FILE
,
$filename
)
{
unless
(
open
FILE
,
$filename
)
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
View file @
deb28bc9
...
@@ -18,7 +18,7 @@ sub compactConf {
...
@@ -18,7 +18,7 @@ sub compactConf {
$keep
{
$mod
}
=
1
;
$keep
{
$mod
}
=
1
;
}
}
if
(
$keep
{
combination
}
)
{
if
(
$keep
{
combination
}
)
{
foreach
my
$md
(
keys
%
{
$conf
->
{
combModules
}}
)
{
foreach
my
$md
(
keys
%
{
$conf
->
{
combModules
}
}
)
{
$_
=
$conf
->
{
combModules
}
->
{
$md
}
->
{
type
};
$_
=
$conf
->
{
combModules
}
->
{
$md
}
->
{
type
};
s/^(\w+).*$/lc($1)/
e
;
s/^(\w+).*$/lc($1)/
e
;
s/OpenIDConnect/oidc/i
;
s/OpenIDConnect/oidc/i
;
...
@@ -35,7 +35,7 @@ sub compactConf {
...
@@ -35,7 +35,7 @@ sub compactConf {
}
}
}
}
}
}
foreach
my
$key
(
keys
%$authParameters
)
{
foreach
my
$key
(
keys
%$authParameters
)
{
my
$mod
=
$key
;
my
$mod
=
$key
;
$mod
=~
s/Params$//
;
$mod
=~
s/Params$//
;
unless
(
$keep
{
$mod
}
)
{
unless
(
$keep
{
$mod
}
)
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
View file @
deb28bc9
...
@@ -28,14 +28,14 @@ extends 'Lemonldap::NG::Common::Conf::AccessLib';
...
@@ -28,14 +28,14 @@ extends 'Lemonldap::NG::Common::Conf::AccessLib';
#@return keyvalue (string, int or hashref)
#@return keyvalue (string, int or hashref)
sub
getConfKey
{
sub
getConfKey
{
my
(
$self
,
$req
,
$key
,
@args
)
=
@_
;
my
(
$self
,
$req
,
$key
,
@args
)
=
@_
;
$self
->
l
mLog
(
"
Search for
$key
in conf
",
'
debug
'
);
$self
->
l
ogger
->
debug
("
Search for
$key
in conf
"
);
# Verify that cfgNum has been asked
# Verify that cfgNum has been asked
unless
(
defined
$req
->
params
('
cfgNum
')
)
{
unless
(
defined
$req
->
params
('
cfgNum
')
)
{
$req
->
error
("
Missing configuration number
");
$req
->
error
("
Missing configuration number
");
return
undef
;
return
undef
;
}
}
$self
->
l
mLog
(
"
Cfgnum set to
"
.
$req
->
params
('
cfgNum
'),
'
debug
'
);
$self
->
l
ogger
->
debug
(
"
Cfgnum set to
"
.
$req
->
params
('
cfgNum
')
);
# when 'latest' => replace by last cfgNum
# when 'latest' => replace by last cfgNum
if
(
$req
->
params
('
cfgNum
')
eq
'
latest
'
)
{
if
(
$req
->
params
('
cfgNum
')
eq
'
latest
'
)
{
...
@@ -117,7 +117,7 @@ sub getConfByNum {
...
@@ -117,7 +117,7 @@ sub getConfByNum {
#@return PSGI JSON response
#@return PSGI JSON response
sub
complexNodesRoot
{
sub
complexNodesRoot
{
my
(
$self
,
$req
,
$query
,
$tpl
)
=
@_
;
my
(
$self
,
$req
,
$query
,
$tpl
)
=
@_
;
$self
->
l
mLog
(
"
Query for
$query
template keys
",
'
debug
'
);
$self
->
l
ogger
->
debug
("
Query for
$query
template keys
"
);
my
$tmp
=
$self
->
getConfKey
(
$req
,
$query
);
my
$tmp
=
$self
->
getConfKey
(
$req
,
$query
);
return
$self
->
sendError
(
$req
,
undef
,
400
)
if
(
$req
->
error
);
return
$self
->
sendError
(
$req
,
undef
,
400
)
if
(
$req
->
error
);
...
@@ -170,7 +170,7 @@ sub virtualHosts {
...
@@ -170,7 +170,7 @@ sub virtualHosts {
my
(
$id
,
$resp
)
=
(
1
,
[]
);
my
(
$id
,
$resp
)
=
(
1
,
[]
);
my
$vhk
=
eval
{
$self
->
getConfKey
(
$req
,
$query
)
->
{
$vh
}
}
//
{};
my
$vhk
=
eval
{
$self
->
getConfKey
(
$req
,
$query
)
->
{
$vh
}
}
//
{};
return
$self
->
sendError
(
$req
,
undef
,
400
)
if
(
$req
->
error
);
return
$self
->
sendError
(
$req
,
undef
,
400
)
if
(
$req
->
error
);
$self
->
l
mLog
(
"
Query for
$vh
/
$query
keys
",
'
debug
'
);
$self
->
l
ogger
->
debug
("
Query for
$vh
/
$query
keys
"
);
# Keys are ordered except 'default' which must be at the end
# Keys are ordered except 'default' which must be at the end
foreach
my
$r
(
foreach
my
$r
(
...
@@ -210,7 +210,7 @@ sub virtualHosts {
...
@@ -210,7 +210,7 @@ sub virtualHosts {
return
$self
->
sendJSONresponse
(
$req
,
$resp
);
return
$self
->
sendJSONresponse
(
$req
,
$resp
);
}
}
elsif
(
$query
=~
/^vhost(?:(?:Aliase|Http)s|Maintenance|Port|Type)$/
)
{
elsif
(
$query
=~
/^vhost(?:(?:Aliase|Http)s|Maintenance|Port|Type)$/
)
{
$self
->
l
mLog
(
"
Query for
$vh
/
$query
key
",
'
debug
'
);
$self
->
l
ogger
->
debug
("
Query for
$vh
/
$query
key
"
);
# TODO: verify how this is done actually
# TODO: verify how this is done actually
my
$k1
=
$self
->
getConfKey
(
$req
,
'
vhostOptions
'
);
my
$k1
=
$self
->
getConfKey
(
$req
,
'
vhostOptions
'
);
...
@@ -593,14 +593,14 @@ sub combModules {
...
@@ -593,14 +593,14 @@ sub combModules {
foreach
my
$mod
(
keys
%$val
)
{
foreach
my
$mod
(
keys
%$val
)
{
my
$tmp
;
my
$tmp
;
$tmp
->
{
title
}
=
$mod
;
$tmp
->
{
title
}
=
$mod
;
$tmp
->
{
id
}
=
"
combModules/
$mod
";
$tmp
->
{
id
}
=
"
combModules/
$mod
";
$tmp
->
{
type
}
=
'
cmbModule
';
$tmp
->
{
type
}
=
'
cmbModule
';
$tmp
->
{
data
}
->
{
$_
}
=
$val
->
{
$mod
}
->
{
$_
}
foreach
(
qw(type for)
);
$tmp
->
{
data
}
->
{
$_
}
=
$val
->
{
$mod
}
->
{
$_
}
foreach
(
qw(type for)
);
my
$over
=
$val
->
{
$mod
}
->
{
over
}
//
{};
my
$over
=
$val
->
{
$mod
}
->
{
over
}
//
{};
$tmp
->
{
data
}
->
{
over
}
=
[
map
{
[
$_
,
$over
->
{
$_
}
]
}
keys
%$over
];
$tmp
->
{
data
}
->
{
over
}
=
[
map
{
[
$_
,
$over
->
{
$_
}
]
}
keys
%$over
];
push
@$res
,
$tmp
;
push
@$res
,
$tmp
;
}
}
return
$self
->
sendJSONresponse
(
$req
,
$res
);
return
$self
->
sendJSONresponse
(
$req
,
$res
);
}
}
# 33 - Root queries
# 33 - Root queries
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Apache2.pm
View file @
deb28bc9
...
@@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::Apache2;
...
@@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::Apache2;
use
Apache2::
ServerRec
;
use
Apache2::
ServerRec
;
sub
new
{
sub
new
{
return
bless
{},
shift
;
return
bless
{},
shift
;
}
}
...
@@ -10,6 +10,6 @@ sub AUTOLOAD {
...
@@ -10,6 +10,6 @@ sub AUTOLOAD {
shift
;
shift
;
$AUTOLOAD
=~
s/.*:://
;
$AUTOLOAD
=~
s/.*:://
;
return
Apache2::
ServerRec
->
log
->
$AUTOLOAD
(
@
_
);
return
Apache2::
ServerRec
->
log
->
$AUTOLOAD
(
@
_
);
}
;
}
1
;
1
;
lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Syslog.pm
View file @
deb28bc9
...
@@ -22,7 +22,7 @@ sub new {
...
@@ -22,7 +22,7 @@ sub new {
$name
=
'
warning
'
if
(
$_
eq
'
warn
'
);
$name
=
'
warning
'
if
(
$_
eq
'
warn
'
);
$name
=
'
err
'
if
(
$_
eq
'
error
'
);
$name
=
'
err
'
if
(
$_
eq
'
error
'
);
eval
qq'sub $_ {syslog("$name|".\$_[0]->{facility},\$_[1])}'
;
eval
qq'sub $_ {syslog("$name|".\$_[0]->{facility},\$_[1])}'
;
die
$@
if
(
$@
);
die
$@
if
(
$@
);
}
}
else
{
else
{
eval
qq'sub $_ {1}'
;
eval
qq'sub $_ {1}'
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Module.pm
View file @
deb28bc9
...
@@ -5,16 +5,14 @@ use Mouse;
...
@@ -5,16 +5,14 @@ use Mouse;
our
$VERSION
=
'
2.0.0
';
our
$VERSION
=
'
2.0.0
';
# Object that provides l
mLog
and error methods (typically PSGI object)
# Object that provides l
oggers
and error methods (typically PSGI object)
has
p
=>
(
is
=>
'
rw
',
weak_ref
=>
1
);
has
p
=>
(
is
=>
'
rw
',
weak_ref
=>
1
);
# Lemonldap::NG configuration hash ref
# Lemonldap::NG configuration hash ref
has
conf
=>
(
is
=>
'
rw
',
weak_ref
=>
1
);
has
conf
=>
(
is
=>
'
rw
',
weak_ref
=>
1
);
sub
lmLog
{
has
logger
=>
(
is
=>
'
ro
',
default
=>
sub
{
$_
[
0
]
->
{
p
}
->
logger
}
);
my
$self
=
shift
;
has
userLogger
=>
(
is
=>
'
ro
',
default
=>
sub
{
$_
[
0
]
->
{
p
}
->
userLogger
}
);
return
$self
->
p
->
lmLog
(
@
_
);
}
sub
error
{
sub
error
{
my
$self
=
shift
;
my
$self
=
shift
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/DBI.pm
View file @
deb28bc9
...
@@ -14,9 +14,10 @@ use Encode;
...
@@ -14,9 +14,10 @@ use Encode;
our
$VERSION
=
'
2.0.0
';
our
$VERSION
=
'
2.0.0
';
extends
'
Lemonldap::NG::Common::Notifications
';
extends
'
Lemonldap::NG::Common::Notifications
';
sub
import
{
sub
import
{
shift
;
shift
;
return
Lemonldap::NG::Common::
Notifications
->
import
(
@
_
)
return
Lemonldap::NG::Common::
Notifications
->
import
(
@
_
)
;
}
}
has
dbiTable
=>
(
has
dbiTable
=>
(
...
@@ -32,7 +33,7 @@ has dbiChain => (
...
@@ -32,7 +33,7 @@ has dbiChain => (
has
dbiUser
=>
(
has
dbiUser
=>
(
is
=>
'
ro
',
is
=>
'
ro
',
default
=>
sub
{
default
=>
sub
{
$_
[
0
]
->
{
p
}
->
l
mLog
(
'
Warning: "dbiUser" parameter is not set
',
'
warn
'
);
$_
[
0
]
->
{
p
}
->
l
ogger
->
warn
('
Warning: "dbiUser" parameter is not set
'
);
return
'';
return
'';
}
}
);
);
...
@@ -49,7 +50,7 @@ has _dbh => (
...
@@ -49,7 +50,7 @@ has _dbh => (
$self
->
{
dbiChain
},
$self
->
{
dbiUser
},
$self
->
{
dbiChain
},
$self
->
{
dbiUser
},
$self
->
{
dbiPassword
},
{
RaiseError
=>
0
}
$self
->
{
dbiPassword
},
{
RaiseError
=>
0
}
);
);
$self
->
l
mLog
(
$
DBI::
errstr
,
'
error
'
)
unless
(
$r
);
$self
->
l
ogger
->
error
(
$
DBI::
errstr
)
unless
(
$r
);
return
$r
;
return
$r
;
}
}
);
);
...
@@ -83,7 +84,7 @@ sub get {
...
@@ -83,7 +84,7 @@ sub get {
&getIdentifier
(
$self
,
$h
->
{
uid
},
$h
->
{
ref
},
$h
->
{
date
}
);
&getIdentifier
(
$self
,
$h
->
{
uid
},
$h
->
{
ref
},
$h
->
{
date
}
);
$result
->
{
$identifier
}
=
$xml
;
$result
->
{
$identifier
}
=
$xml
;
}
}
$self
->
l
mLog
(
$self
->
sth
->
err
(),
'
warn
'
)
if
(
$self
->
sth
->
err
()
);
$self
->
l
ogger
->
warn
(
$self
->
sth
->
err
()
)
if
(
$self
->
sth
->
err
()
);
return
$result
;
return
$result
;
}
}
...
@@ -104,7 +105,7 @@ sub getAll {
...
@@ -104,7 +105,7 @@ sub getAll {
condition
=>
$h
->
{
condition
}
condition
=>
$h
->
{
condition
}
};
};
}
}
$self
->
l
mLog
(
$self
->
sth
->
err
(),
'
warn
'
)
if
(
$self
->
sth
->
err
()
);
$self
->
l
ogger
->
warn
(
$self
->
sth
->
err
()
)
if
(
$self
->
sth
->
err
()
);
return
$result
;
return
$result
;
}
}
...
@@ -115,7 +116,7 @@ sub delete {
...
@@ -115,7 +116,7 @@ sub delete {
my
(
$self
,
$myref
)
=
@_
;
my
(
$self
,
$myref
)
=
@_
;
my
(
$d
,
$u
,
$r
);
my
(
$d
,
$u
,
$r
);
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
$self
->
l
mLog
(
"
Bad reference
$myref
",
'
warn
'
);
$self
->
l
ogger
->
warn
("
Bad reference
$myref
"
);
return
0
;
return
0
;
}
}
my
@ts
=
localtime
();
my
@ts
=
localtime
();
...
@@ -136,7 +137,7 @@ sub purge {
...
@@ -136,7 +137,7 @@ sub purge {
my
(
$self
,
$myref
,
$force
)
=
@_
;
my
(
$self
,
$myref
,
$force
)
=
@_
;
my
(
$d
,
$u
,
$r
);
my
(
$d
,
$u
,
$r
);
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
$self
->
l
mLog
(
"
Bad reference
$myref
",
'
warn
'
);
$self
->
l
ogger
->
warn
("
Bad reference
$myref
"
);
return
0
;
return
0
;
}
}
...
@@ -186,7 +187,7 @@ sub getDone {
...
@@ -186,7 +187,7 @@ sub getDone {
$result
->
{"
$h
->{date}#
$h
->{uid}#
$h
->{ref}
"}
=
$result
->
{"
$h
->{date}#
$h
->{uid}#
$h
->{ref}
"}
=
{
notified
=>
$done
,
uid
=>
$h
->
{
uid
},
ref
=>
$h
->
{
ref
},
};
{
notified
=>
$done
,
uid
=>
$h
->
{
uid
},
ref
=>
$h
->
{
ref
},
};
}
}
$self
->
l
mLog
(
$self
->
sth
->
err
(),
'
warn
'
)
if
(
$self
->
sth
->
err
()
);
$self
->
l
ogger
->
warn
(
$self
->
sth
->
err
()
)
if
(
$self
->
sth
->
err
()
);
return
$result
;
return
$result
;
}
}
...
@@ -197,12 +198,12 @@ sub _execute {
...
@@ -197,12 +198,12 @@ sub _execute {
my
(
$self
,
$query
,
@args
)
=
@_
;
my
(
$self
,
$query
,
@args
)
=
@_
;
my
$dbh
=
$self
->
_dbh
or
return
0
;
my
$dbh
=
$self
->
_dbh
or
return
0
;
unless
(
$self
->
sth
(
$dbh
->
prepare
(
$query
)
)
)
{
unless
(
$self
->
sth
(
$dbh
->
prepare
(
$query
)
)
)
{
$self
->
l
mLog
(
$dbh
->
errstr
(),
'
warn
'
);
$self
->
l
ogger
->
warn
(
$dbh
->
errstr
()
);
return
0
;
return
0
;
}
}
my
$tmp
;
my
$tmp
;
unless
(
$tmp
=
$self
->
sth
->
execute
(
@args
)
)
{
unless
(
$tmp
=
$self
->
sth
->
execute
(
@args
)
)
{
$self
->
l
mLog
(
$self
->
sth
->
errstr
(),
'
warn
'
);
$self
->
l
ogger
->
warn
(
$self
->
sth
->
errstr
()
);
return
0
;
return
0
;
}
}
return
$tmp
;
return
$tmp
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/File.pm
View file @
deb28bc9
...
@@ -48,8 +48,8 @@ sub get {
...
@@ -48,8 +48,8 @@ sub get {
my
$files
;
my
$files
;
foreach
my
$file
(
@notif
)
{
foreach
my
$file
(
@notif
)
{
unless
(
open
F
,
$self
->
{
dirName
}
.
"
/
$file
"
)
{
unless
(
open
F
,
$self
->
{
dirName
}
.
"
/
$file
"
)
{
$self
->
l
mLog
(
"
Unable to read notification
$self
->{dirName}/
$file
",
$self
->
l
ogger
->
error
(
'
error
'
);
"
Unable to read notification
$self
->{dirName}/
$file
"
);
next
;
next
;
}
}
$files
->
{
$file
}
=
join
(
'',
<
F
>
);
$files
->
{
$file
}
=
join
(
'',
<
F
>
);
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
View file @
deb28bc9
...
@@ -9,7 +9,7 @@ sub newNotification {
...
@@ -9,7 +9,7 @@ sub newNotification {
my
$json
;
my
$json
;
eval
{
$json
=
from_json
(
$jsonString
)
};
eval
{
$json
=
from_json
(
$jsonString
)
};
if
(
my
$err
=
$@
)
{
if
(
my
$err
=
$@
)
{
eval
{
$self
->
l
mLog
(
"
Unable to decode JSON file:
$err
",
'
error
'
)
};
eval
{
$self
->
l
ogger
->
error
("
Unable to decode JSON file:
$err
"
)
};
return
0
;
return
0
;
}
}
my
@notifs
;
my
@notifs
;
...
@@ -21,7 +21,7 @@ sub newNotification {
...
@@ -21,7 +21,7 @@ sub newNotification {
foreach
(
qw(date uid reference)
)
{
foreach
(
qw(date uid reference)
)
{
my
$tmp
;
my
$tmp
;
unless
(
$tmp
=
$notif
->
{
$_
}
)
{
unless
(
$tmp
=
$notif
->
{
$_
}
)
{
$self
->
l
mLog
(
"
Attribute
$_
is missing
",
'
error
'
);
$self
->
l
ogger
->
error
("
Attribute
$_
is missing
"
);
return
0
;
return
0
;
}
}
push
@datas
,
$tmp
;
push
@datas
,
$tmp
;
...
@@ -44,16 +44,14 @@ sub deleteNotification {
...
@@ -44,16 +44,14 @@ sub deleteNotification {
# Check input parameters
# Check input parameters
unless
(
$uid
and
$myref
)
{
unless
(
$uid
and
$myref
)
{
$self
->
lmLog
(
$self
->
userLogger
->
error
(
'
REST service "delete notification" called without all parameters
',
'
REST service "delete notification" called without all parameters
'
'
error
'
);
);
return
0
;
return
0
;
}
}
$self
->
lmLog
(
$self
->
logger
->
debug
(
"
REST service deleteNotification called for uid
$uid
and reference
$myref
",
"
REST service deleteNotification called for uid
$uid
and reference
$myref
"
'
debug
'
);
);
# Get notifications
# Get notifications
...
@@ -79,7 +77,7 @@ sub deleteNotification {
...
@@ -79,7 +77,7 @@ sub deleteNotification {
# Delete the notification (really)
# Delete the notification (really)
foreach
(
@data
)
{
foreach
(
@data
)
{
if
(
$self
->
purge
(
$_
,
1
)
)
{
if
(
$self
->
purge
(
$_
,
1
)
)
{
$self
->
l
mLog
(
"
Notification
$_
was removed.
",
'
debug
'
);
$self
->
l
ogger
->
debug
("
Notification
$_
was removed.
"
);
$count
++
;
$count
++
;
}
}
}
}
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
View file @
deb28bc9
...
@@ -16,9 +16,10 @@ use utf8;
...
@@ -16,9 +16,10 @@ use utf8;
our
$VERSION
=
'
2.0.0
';
our
$VERSION
=
'
2.0.0
';
extends
'
Lemonldap::NG::Common::Notifications
';
extends
'
Lemonldap::NG::Common::Notifications
';
sub
import
{
sub
import
{
shift
;
shift
;
return
Lemonldap::NG::Common::
Notifications
->
import
(
@
_
)
return
Lemonldap::NG::Common::
Notifications
->
import
(
@
_
)
;
}
}
has
ldapServer
=>
(
has
ldapServer
=>
(
...
@@ -38,7 +39,7 @@ has ldapConfBase => (
...
@@ -38,7 +39,7 @@ has ldapConfBase => (
has
ldapBindDN
=>
(
has
ldapBindDN
=>
(
is
=>
'
ro
',
is
=>
'
ro
',
default
=>
sub
{
default
=>
sub
{
$_
[
0
]
->
p
->
l
mLog
(
'
Warning: "ldapBindDN" parameter is not set
',
'
warn
'
);
$_
[
0
]
->
p
->
l
ogger
->
warn
('
Warning: "ldapBindDN" parameter is not set
'
);
return
'';
return
'';
}
}
);
);
...
@@ -69,7 +70,7 @@ sub get {
...
@@ -69,7 +70,7 @@ sub get {
my
$identifier
=
my
$identifier
=
&getIdentifier
(
$self
,
$f
->
{
uid
},
$f
->
{
ref
},
$f
->
{
date
}
);
&getIdentifier
(
$self
,
$f
->
{
uid
},
$f
->
{
ref
},
$f
->
{
date
}
);
$result
->
{
$identifier
}
=
"
$xml
";
$result
->
{
$identifier
}
=
"
$xml
";
$self
->
l
mLog
(
"
notification
$identifier
found
",
'
info
'
);
$self
->
l
ogger
->
info
("
notification
$identifier
found
"
);
}
}
return
$result
;
return
$result
;
...
@@ -113,7 +114,7 @@ sub delete {
...
@@ -113,7 +114,7 @@ sub delete {
my
(
$self
,
$myref
)
=
@_
;
my
(
$self
,
$myref
)
=
@_
;
my
(
$d
,
$u
,
$r
);
my
(
$d
,
$u
,
$r
);
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
unless
(
(
$d
,
$u
,
$r
)
=
(
$myref
=~
/^([^#]+)#(.+?)#(.+)$/
)
)
{
$self
->
l
mLog
(
"
Bad reference
$myref
",
'
warn
'
);