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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dcoutadeur dcoutadeur
lemonldap-ng
Commits
8b5387a4
Commit
8b5387a4
authored
Sep 17, 2019
by
Xavier Guimard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.0'
parents
f9704e89
516d053d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
529 additions
and
130 deletions
+529
-130
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
+2
-92
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/StatusConstants.pm
...g-handler/lib/Lemonldap/NG/Handler/Lib/StatusConstants.pm
+109
-0
lemonldap-ng-manager/MANIFEST
lemonldap-ng-manager/MANIFEST
+1
-0
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+112
-8
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/PortalConstants.pm
...manager/lib/Lemonldap/NG/Manager/Build/PortalConstants.pm
+109
-0
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm
...nldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm
+190
-29
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
+4
-1
scripts/jsongenerator.pl
scripts/jsongenerator.pl
+2
-0
No files found.
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
View file @
8b5387a4
...
...
@@ -8,6 +8,7 @@ use POSIX qw(setuid setgid);
use
JSON
qw(to_json)
;
use
IO::
Select
;
use
IO::Socket::
INET
;
use
Lemonldap::NG::Handler::Lib::
StatusConstants
qw(portalConsts)
;
our
$VERSION
=
'
2.1.0
';
...
...
@@ -18,97 +19,6 @@ use constant MN_COUNT => 5;
our
$page_title
=
'
Lemonldap::NG statistics
';
## @fn private hashRef portalTab()
# @return Constant hash used to convert error codes into string.
sub
portalTab
{
return
{
-
7
=>
'
PORTAL_LOGOUT_OK
',
-
6
=>
'
PORTAL_PASSWORD_OK
',
-
5
=>
'
PORTAL_IDPCHOICE
',
-
4
=>
'
PORTAL_SENDRESPONSE
',
-
3
=>
'
PORTAL_INFO
',
-
2
=>
'
PORTAL_REDIRECT
',
-
1
=>
'
PORTAL_DONE
',
0
=>
'
PORTAL_OK
',
1
=>
'
PORTAL_SESSIONEXPIRED
',
2
=>
'
PORTAL_FORMEMPTY
',
3
=>
'
PORTAL_WRONGMANAGERACCOUNT
',
4
=>
'
PORTAL_USERNOTFOUND
',
5
=>
'
PORTAL_BADCREDENTIALS
',
6
=>
'
PORTAL_LDAPCONNECTFAILED
',
7
=>
'
PORTAL_LDAPERROR
',
8
=>
'
PORTAL_APACHESESSIONERROR
',
9
=>
'
PORTAL_FIRSTACCESS
',
10
=>
'
PORTAL_BADCERTIFICATE
',
21
=>
'
PORTAL_PP_ACCOUNT_LOCKED
',
22
=>
'
PORTAL_PP_PASSWORD_EXPIRED
',
23
=>
'
PORTAL_CERTIFICATEREQUIRED
',
24
=>
'
PORTAL_ERROR
',
25
=>
'
PORTAL_PP_CHANGE_AFTER_RESET
',
26
=>
'
PORTAL_PP_PASSWORD_MOD_NOT_ALLOWED
',
27
=>
'
PORTAL_PP_MUST_SUPPLY_OLD_PASSWORD
',
28
=>
'
PORTAL_PP_INSUFFICIENT_PASSWORD_QUALITY
',
29
=>
'
PORTAL_PP_PASSWORD_TOO_SHORT
',
30
=>
'
PORTAL_PP_PASSWORD_TOO_YOUNG
',
31
=>
'
PORTAL_PP_PASSWORD_IN_HISTORY
',
32
=>
'
PORTAL_PP_GRACE
',
33
=>
'
PORTAL_PP_EXP_WARNING
',
34
=>
'
PORTAL_PASSWORD_MISMATCH
',
36
=>
'
PORTAL_NOTIFICATION
',
37
=>
'
PORTAL_BADURL
',
38
=>
'
PORTAL_NOSCHEME
',
39
=>
'
PORTAL_BADOLDPASSWORD
',
40
=>
'
PORTAL_MALFORMEDUSER
',
41
=>
'
PORTAL_SESSIONNOTGRANTED
',
42
=>
'
PORTAL_CONFIRM
',
43
=>
'
PORTAL_MAILFORMEMPTY
',
44
=>
'
PORTAL_BADMAILTOKEN
',
45
=>
'
PORTAL_MAILERROR
',
46
=>
'
PORTAL_MAILOK
',
48
=>
'
PORTAL_SAML_ERROR
',
49
=>
'
PORTAL_SAML_LOAD_SERVICE_ERROR
',
50
=>
'
PORTAL_SAML_LOAD_IDP_ERROR
',
51
=>
'
PORTAL_SAML_SSO_ERROR
',
52
=>
'
PORTAL_SAML_UNKNOWN_ENTITY
',
53
=>
'
PORTAL_SAML_DESTINATION_ERROR
',
54
=>
'
PORTAL_SAML_CONDITIONS_ERROR
',
55
=>
'
PORTAL_SAML_IDPSSOINITIATED_NOTALLOWED
',
56
=>
'
PORTAL_SAML_SLO_ERROR
',
57
=>
'
PORTAL_SAML_SIGNATURE_ERROR
',
58
=>
'
PORTAL_SAML_ART_ERROR
',
59
=>
'
PORTAL_SAML_SESSION_ERROR
',
60
=>
'
PORTAL_SAML_LOAD_SP_ERROR
',
61
=>
'
PORTAL_SAML_ATTR_ERROR
',
62
=>
'
PORTAL_OPENID_EMPTY
',
63
=>
'
PORTAL_OPENID_BADID
',
64
=>
'
PORTAL_MISSINGREQATTR
',
65
=>
'
PORTAL_BADPARTNER
',
66
=>
'
PORTAL_MAILCONFIRMATION_ALREADY_SENT
',
67
=>
'
PORTAL_PASSWORDFORMEMPTY
',
68
=>
'
PORTAL_CAS_SERVICE_NOT_ALLOWED
',
69
=>
'
PORTAL_MAILFIRSTACCESS
',
70
=>
'
PORTAL_MAILNOTFOUND
',
71
=>
'
PORTAL_PASSWORDFIRSTACCESS
',
72
=>
'
PORTAL_MAILCONFIRMOK
',
73
=>
'
PORTAL_RADIUSCONNECTFAILED
',
74
=>
'
PORTAL_MUST_SUPPLY_OLD_PASSWORD
',
75
=>
'
PORTAL_FORBIDDENIP
',
76
=>
'
PORTAL_CAPTCHAERROR
',
77
=>
'
PORTAL_CAPTCHAEMPTY
',
78
=>
'
PORTAL_REGISTERFIRSTACCESS
',
79
=>
'
PORTAL_REGISTERFORMEMPTY
',
80
=>
'
PORTAL_REGISTERALREADYEXISTS
',
81
=>
'
PE_NOTOKEN
',
82
=>
'
PE_TOKENEXPIRED
',
83
=>
'
PE_U2FFAILED
',
84
=>
'
PE_UNAUTHORIZEDPARTNER
',
85
=>
'
PE_RENEWSESSION
',
86
=>
'
PE_WAIT
',
87
=>
'
PE_MUSTAUTHN
',
88
=>
'
PE_MUSTHAVEMAIL
',
};
}
eval
{
setgid
(
(
getgrnam
(
$ENV
{
APACHE_RUN_GROUP
}
)
)[
2
]
);
setuid
(
(
getpwnam
(
$ENV
{
APACHE_RUN_USER
}
)
)[
2
]
);
...
...
@@ -158,7 +68,7 @@ sub run {
my
(
$user
,
$uri
,
$code
)
=
(
$
1
,
$
2
,
$
3
);
# Portal error translation
$code
=
portal
Tab
->
{
$code
}
||
$code
if
(
$code
=~
/^\-?\d+$/
);
$code
=
portal
Consts
->
{
$code
}
||
$code
if
(
$code
=~
/^\-?\d+$/
);
# Per user activity
$status
->
{
user
}
->
{
$user
}
->
{
$code
}
++
;
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/StatusConstants.pm
0 → 100644
View file @
8b5387a4
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package
Lemonldap::NG::Handler::Lib::
StatusConstants
;
use
strict
;
use
Exporter
'
import
';
our
$VERSION
=
'
2.1.0
';
sub
portalConsts
{
return
{
'
-1
'
=>
'
PE_DONE
',
'
-2
'
=>
'
PE_REDIRECT
',
'
-3
'
=>
'
PE_INFO
',
'
-4
'
=>
'
PE_SENDRESPONSE
',
'
-5
'
=>
'
PE_IDPCHOICE
',
'
-6
'
=>
'
PE_PASSWORD_OK
',
'
-7
'
=>
'
PE_LOGOUT_OK
',
'
0
'
=>
'
PE_OK
',
'
1
'
=>
'
PE_SESSIONEXPIRED
',
'
10
'
=>
'
PE_BADCERTIFICATE
',
'
2
'
=>
'
PE_FORMEMPTY
',
'
21
'
=>
'
PE_PP_ACCOUNT_LOCKED
',
'
22
'
=>
'
PE_PP_PASSWORD_EXPIRED
',
'
23
'
=>
'
PE_CERTIFICATEREQUIRED
',
'
24
'
=>
'
PE_ERROR
',
'
25
'
=>
'
PE_PP_CHANGE_AFTER_RESET
',
'
26
'
=>
'
PE_PP_PASSWORD_MOD_NOT_ALLOWED
',
'
27
'
=>
'
PE_PP_MUST_SUPPLY_OLD_PASSWORD
',
'
28
'
=>
'
PE_PP_INSUFFICIENT_PASSWORD_QUALITY
',
'
29
'
=>
'
PE_PP_PASSWORD_TOO_SHORT
',
'
3
'
=>
'
PE_WRONGMANAGERACCOUNT
',
'
30
'
=>
'
PE_PP_PASSWORD_TOO_YOUNG
',
'
31
'
=>
'
PE_PP_PASSWORD_IN_HISTORY
',
'
32
'
=>
'
PE_PP_GRACE
',
'
33
'
=>
'
PE_PP_EXP_WARNING
',
'
34
'
=>
'
PE_PASSWORD_MISMATCH
',
'
36
'
=>
'
PE_NOTIFICATION
',
'
37
'
=>
'
PE_BADURL
',
'
38
'
=>
'
PE_NOSCHEME
',
'
39
'
=>
'
PE_BADOLDPASSWORD
',
'
4
'
=>
'
PE_USERNOTFOUND
',
'
40
'
=>
'
PE_MALFORMEDUSER
',
'
41
'
=>
'
PE_SESSIONNOTGRANTED
',
'
42
'
=>
'
PE_CONFIRM
',
'
43
'
=>
'
PE_MAILFORMEMPTY
',
'
44
'
=>
'
PE_BADMAILTOKEN
',
'
45
'
=>
'
PE_MAILERROR
',
'
46
'
=>
'
PE_MAILOK
',
'
48
'
=>
'
PE_SAML_ERROR
',
'
49
'
=>
'
PE_SAML_LOAD_SERVICE_ERROR
',
'
5
'
=>
'
PE_BADCREDENTIALS
',
'
50
'
=>
'
PE_SAML_LOAD_IDP_ERROR
',
'
51
'
=>
'
PE_SAML_SSO_ERROR
',
'
52
'
=>
'
PE_SAML_UNKNOWN_ENTITY
',
'
53
'
=>
'
PE_SAML_DESTINATION_ERROR
',
'
54
'
=>
'
PE_SAML_CONDITIONS_ERROR
',
'
55
'
=>
'
PE_SAML_IDPSSOINITIATED_NOTALLOWED
',
'
56
'
=>
'
PE_SAML_SLO_ERROR
',
'
57
'
=>
'
PE_SAML_SIGNATURE_ERROR
',
'
58
'
=>
'
PE_SAML_ART_ERROR
',
'
59
'
=>
'
PE_SAML_SESSION_ERROR
',
'
6
'
=>
'
PE_LDAPCONNECTFAILED
',
'
60
'
=>
'
PE_SAML_LOAD_SP_ERROR
',
'
61
'
=>
'
PE_SAML_ATTR_ERROR
',
'
62
'
=>
'
PE_OPENID_EMPTY
',
'
63
'
=>
'
PE_OPENID_BADID
',
'
64
'
=>
'
PE_MISSINGREQATTR
',
'
65
'
=>
'
PE_BADPARTNER
',
'
66
'
=>
'
PE_MAILCONFIRMATION_ALREADY_SENT
',
'
67
'
=>
'
PE_PASSWORDFORMEMPTY
',
'
68
'
=>
'
PE_CAS_SERVICE_NOT_ALLOWED
',
'
69
'
=>
'
PE_MAILFIRSTACCESS
',
'
7
'
=>
'
PE_LDAPERROR
',
'
70
'
=>
'
PE_MAILNOTFOUND
',
'
71
'
=>
'
PE_PASSWORDFIRSTACCESS
',
'
72
'
=>
'
PE_MAILCONFIRMOK
',
'
73
'
=>
'
PE_RADIUSCONNECTFAILED
',
'
74
'
=>
'
PE_MUST_SUPPLY_OLD_PASSWORD
',
'
75
'
=>
'
PE_FORBIDDENIP
',
'
76
'
=>
'
PE_CAPTCHAERROR
',
'
77
'
=>
'
PE_CAPTCHAEMPTY
',
'
78
'
=>
'
PE_REGISTERFIRSTACCESS
',
'
79
'
=>
'
PE_REGISTERFORMEMPTY
',
'
8
'
=>
'
PE_APACHESESSIONERROR
',
'
80
'
=>
'
PE_REGISTERALREADYEXISTS
',
'
81
'
=>
'
PE_NOTOKEN
',
'
82
'
=>
'
PE_TOKENEXPIRED
',
'
83
'
=>
'
PE_U2FFAILED
',
'
84
'
=>
'
PE_UNAUTHORIZEDPARTNER
',
'
85
'
=>
'
PE_RENEWSESSION
',
'
86
'
=>
'
PE_WAIT
',
'
87
'
=>
'
PE_MUSTAUTHN
',
'
88
'
=>
'
PE_MUSTHAVEMAIL
',
'
89
'
=>
'
PE_SAML_SERVICE_NOT_ALLOWED
',
'
9
'
=>
'
PE_FIRSTACCESS
',
'
90
'
=>
'
PE_OIDC_SERVICE_NOT_ALLOWED
',
'
91
'
=>
'
PE_OID_SERVICE_NOT_ALLOWED
',
'
92
'
=>
'
PE_GET_SERVICE_NOT_ALLOWED
',
'
93
'
=>
'
PE_IMPERSONATION_SERVICE_NOT_ALLOWED
',
'
94
'
=>
'
PE_ISSUERMISSINGREQATTR
'
};
}
# EXPORTER PARAMETERS
our
@EXPORT_OK
=
('
portalConsts
');
our
%EXPORT_TAGS
=
(
'
all
'
=>
[
@EXPORT_OK
,
'
import
'
],
);
1
;
lemonldap-ng-manager/MANIFEST
View file @
8b5387a4
...
...
@@ -11,6 +11,7 @@ lib/Lemonldap/NG/Manager/Attributes.pm
lib/Lemonldap/NG/Manager/Build.pm
lib/Lemonldap/NG/Manager/Build/Attributes.pm
lib/Lemonldap/NG/Manager/Build/CTrees.pm
lib/Lemonldap/NG/Manager/Build/PortalConstants.pm
lib/Lemonldap/NG/Manager/Build/Tree.pm
lib/Lemonldap/NG/Manager/Cli.pm
lib/Lemonldap/NG/Manager/Cli/Lib.pm
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
View file @
8b5387a4
...
...
@@ -6,6 +6,7 @@ use Mouse;
use
Lemonldap::NG::Manager::Build::
Attributes
;
use
Lemonldap::NG::Manager::Build::
Tree
;
use
Lemonldap::NG::Manager::Build::
CTrees
;
use
Lemonldap::NG::Manager::Build::
PortalConstants
;
use
Lemonldap::NG::Manager::Conf::
Zero
;
use
Data::
Dumper
;
use
Regexp::
Assemble
;
...
...
@@ -13,14 +14,16 @@ use JSON;
use
Getopt::
Std
;
use
IO::
String
;
has
structFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
confTreeFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
managerConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
managerAttributesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
defaultValuesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
confConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
firstLmConfFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
reverseTreeFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
structFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
confTreeFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
managerConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
managerAttributesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
defaultValuesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
confConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
firstLmConfFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
reverseTreeFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
portalConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
handlerStatusConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
my
@managerAttrKeys
=
qw(keyTest keyMsgFail select type test msgFail default)
;
my
$format
=
'
Creating %-69s:
';
...
...
@@ -408,7 +411,9 @@ $managerAttr}
$jsonEnc
->
pretty
(
0
);
print
F
$jsonEnc
->
encode
(
$reverseScanResult
);
close
F
;
print
STDERR
"
done
\n
";
$self
->
buildPortalConstants
();
}
sub
buildZeroConf
{
...
...
@@ -426,6 +431,105 @@ sub buildZeroConf {
print
STDERR
"
done
\n
";
}
sub
buildPortalConstants
()
{
my
$self
=
shift
;
my
%portalConstants
=
%
{
Lemonldap::NG::Manager::Build::PortalConstants::
portalConstants
()
};
my
%reverseConstants
=
reverse
%portalConstants
;
die
"
Duplicate value in portal constants
"
unless
%reverseConstants
==
%portalConstants
;
printf
STDERR
$format
,
$self
->
portalConstantsFile
;
open
(
F
,
'
>
',
$self
->
portalConstantsFile
)
or
die
(
$!
);
my
$content
=
<<EOF;
# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Portal::Main::Constants;
use strict;
use Exporter 'import';
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION';
use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::Main';
use constant {
EOF
for
my
$pe
(
sort
{
$portalConstants
{
$a
}
<=>
$portalConstants
{
$b
}
}
keys
%portalConstants
)
{
my
$str
=
$portalConstants
{
$pe
};
$content
.=
"
$pe
=>
$str
,
\n
";
}
my
$exports
=
join
"
,
",
map
{
"
'
$_
'
"
}
sort
{
$portalConstants
{
$a
}
<=>
$portalConstants
{
$b
}
}
keys
%portalConstants
;
my
$portalConstsStr
.=
mydump
(
\
%reverseConstants
,
'
portalConsts
'
);
$content
.=
<<EOF;
};
$portalConstsStr
}
# EXPORTER PARAMETERS
our \@EXPORT_OK = ( 'portalConsts', 'HANDLER', $exports );
our %EXPORT_TAGS = ( 'all' => [ \@EXPORT_OK, 'import' ], );
our \@EXPORT = qw(import PE_OK);
1;
EOF
my
$dst
;
eval
{
Perl::Tidy::
perltidy
(
source
=>
IO::
String
->
new
(
$content
),
destination
=>
\
$dst
);
};
$dst
=
$content
if
(
$@
);
open
(
F
,
'
>
',
$self
->
portalConstantsFile
)
or
die
(
$!
);
print
F
$dst
;
close
F
;
print
STDERR
"
done
\n
";
printf
STDERR
$format
,
$self
->
handlerStatusConstantsFile
;
# Handler Status file
my
$content
=
<<EOF;
# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Handler::Lib::StatusConstants;
use strict;
use Exporter 'import';
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION';
$portalConstsStr
}
# EXPORTER PARAMETERS
our \@EXPORT_OK = ( 'portalConsts' );
our %EXPORT_TAGS = ( 'all' => [ \@EXPORT_OK, 'import' ], );
1;
EOF
eval
{
Perl::Tidy::
perltidy
(
source
=>
IO::
String
->
new
(
$content
),
destination
=>
\
$dst
);
};
$dst
=
$content
if
(
$@
);
open
(
F
,
'
>
',
$self
->
handlerStatusConstantsFile
)
or
die
(
$!
);
print
F
$dst
;
close
F
;
print
STDERR
"
done
\n
";
}
sub
mydump
{
my
(
$obj
,
$subname
)
=
@_
;
my
$t
=
Dumper
(
$obj
);
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/PortalConstants.pm
0 → 100644
View file @
8b5387a4
# This file contains the list of portal statuses, used in portal and portal
# plugins, and displayed in the Handler Status page
# DON'T FORGET TO RUN "make json" AFTER EACH CHANGE
package
Lemonldap::NG::Manager::Build::
PortalConstants
;
our
$VERSION
=
'
2.0.6
';
sub
portalConstants
{
return
{
# Portal errors
# Developers warning, do not use PE_INFO, it's reserved to autoRedirect.
PE_LOGOUT_OK
=>
-
7
,
PE_PASSWORD_OK
=>
-
6
,
PE_IDPCHOICE
=>
-
5
,
PE_SENDRESPONSE
=>
-
4
,
PE_INFO
=>
-
3
,
PE_REDIRECT
=>
-
2
,
PE_DONE
=>
-
1
,
PE_OK
=>
0
,
PE_SESSIONEXPIRED
=>
1
,
PE_FORMEMPTY
=>
2
,
PE_WRONGMANAGERACCOUNT
=>
3
,
PE_USERNOTFOUND
=>
4
,
PE_BADCREDENTIALS
=>
5
,
PE_LDAPCONNECTFAILED
=>
6
,
PE_LDAPERROR
=>
7
,
PE_APACHESESSIONERROR
=>
8
,
PE_FIRSTACCESS
=>
9
,
PE_BADCERTIFICATE
=>
10
,
PE_PP_ACCOUNT_LOCKED
=>
21
,
PE_PP_PASSWORD_EXPIRED
=>
22
,
PE_CERTIFICATEREQUIRED
=>
23
,
PE_ERROR
=>
24
,
PE_PP_CHANGE_AFTER_RESET
=>
25
,
PE_PP_PASSWORD_MOD_NOT_ALLOWED
=>
26
,
PE_PP_MUST_SUPPLY_OLD_PASSWORD
=>
27
,
PE_PP_INSUFFICIENT_PASSWORD_QUALITY
=>
28
,
PE_PP_PASSWORD_TOO_SHORT
=>
29
,
PE_PP_PASSWORD_TOO_YOUNG
=>
30
,
PE_PP_PASSWORD_IN_HISTORY
=>
31
,
PE_PP_GRACE
=>
32
,
PE_PP_EXP_WARNING
=>
33
,
PE_PASSWORD_MISMATCH
=>
34
,
PE_NOTIFICATION
=>
36
,
PE_BADURL
=>
37
,
PE_NOSCHEME
=>
38
,
PE_BADOLDPASSWORD
=>
39
,
PE_MALFORMEDUSER
=>
40
,
PE_SESSIONNOTGRANTED
=>
41
,
PE_CONFIRM
=>
42
,
PE_MAILFORMEMPTY
=>
43
,
PE_BADMAILTOKEN
=>
44
,
PE_MAILERROR
=>
45
,
PE_MAILOK
=>
46
,
PE_SAML_ERROR
=>
48
,
PE_SAML_LOAD_SERVICE_ERROR
=>
49
,
PE_SAML_LOAD_IDP_ERROR
=>
50
,
PE_SAML_SSO_ERROR
=>
51
,
PE_SAML_UNKNOWN_ENTITY
=>
52
,
PE_SAML_DESTINATION_ERROR
=>
53
,
PE_SAML_CONDITIONS_ERROR
=>
54
,
PE_SAML_IDPSSOINITIATED_NOTALLOWED
=>
55
,
PE_SAML_SLO_ERROR
=>
56
,
PE_SAML_SIGNATURE_ERROR
=>
57
,
PE_SAML_ART_ERROR
=>
58
,
PE_SAML_SESSION_ERROR
=>
59
,
PE_SAML_LOAD_SP_ERROR
=>
60
,
PE_SAML_ATTR_ERROR
=>
61
,
PE_OPENID_EMPTY
=>
62
,
PE_OPENID_BADID
=>
63
,
PE_MISSINGREQATTR
=>
64
,
PE_BADPARTNER
=>
65
,
PE_MAILCONFIRMATION_ALREADY_SENT
=>
66
,
PE_PASSWORDFORMEMPTY
=>
67
,
PE_CAS_SERVICE_NOT_ALLOWED
=>
68
,
PE_MAILFIRSTACCESS
=>
69
,
PE_MAILNOTFOUND
=>
70
,
PE_PASSWORDFIRSTACCESS
=>
71
,
PE_MAILCONFIRMOK
=>
72
,
PE_RADIUSCONNECTFAILED
=>
73
,
PE_MUST_SUPPLY_OLD_PASSWORD
=>
74
,
PE_FORBIDDENIP
=>
75
,
PE_CAPTCHAERROR
=>
76
,
PE_CAPTCHAEMPTY
=>
77
,
PE_REGISTERFIRSTACCESS
=>
78
,
PE_REGISTERFORMEMPTY
=>
79
,
PE_REGISTERALREADYEXISTS
=>
80
,
PE_NOTOKEN
=>
81
,
PE_TOKENEXPIRED
=>
82
,
PE_U2FFAILED
=>
83
,
PE_UNAUTHORIZEDPARTNER
=>
84
,
PE_RENEWSESSION
=>
85
,
PE_WAIT
=>
86
,
PE_MUSTAUTHN
=>
87
,
PE_MUSTHAVEMAIL
=>
88
,
PE_SAML_SERVICE_NOT_ALLOWED
=>
89
,
PE_OIDC_SERVICE_NOT_ALLOWED
=>
90
,
PE_OID_SERVICE_NOT_ALLOWED
=>
91
,
PE_GET_SERVICE_NOT_ALLOWED
=>
92
,
PE_IMPERSONATION_SERVICE_NOT_ALLOWED
=>
93
,
PE_ISSUERMISSINGREQATTR
=>
94
,
};
}
1
;
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm
View file @
8b5387a4
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package
Lemonldap::NG::Portal::Main::
Constants
;
use
strict
;
...
...
@@ -7,9 +8,6 @@ our $VERSION = '2.1.0';
use
constant
HANDLER
=>
'
Lemonldap::NG::Handler::PSGI::Main
';
use
constant
{
# Portal errors
# Developers warning, do not use PE_INFO, it's reserved to autoRedirect.
PE_LOGOUT_OK
=>
-
7
,
PE_PASSWORD_OK
=>
-
6
,
PE_IDPCHOICE
=>
-
5
,
...
...
@@ -102,33 +100,196 @@ use constant {
PE_ISSUERMISSINGREQATTR
=>
94
,
};
sub
portalConsts
{
return
{
'
-1
'
=>
'
PE_DONE
',
'
-2
'
=>
'
PE_REDIRECT
',
'
-3
'
=>
'
PE_INFO
',
'
-4
'
=>
'
PE_SENDRESPONSE
',
'
-5
'
=>
'
PE_IDPCHOICE
',
'
-6
'
=>
'
PE_PASSWORD_OK
',
'
-7
'
=>
'
PE_LOGOUT_OK
',
'
0
'
=>
'
PE_OK
',
'
1
'
=>
'
PE_SESSIONEXPIRED
',
'
10
'
=>
'
PE_BADCERTIFICATE
',
'
2
'
=>
'
PE_FORMEMPTY
',
'
21
'
=>
'
PE_PP_ACCOUNT_LOCKED
',
'
22
'
=>
'
PE_PP_PASSWORD_EXPIRED
',
'
23
'
=>
'
PE_CERTIFICATEREQUIRED
',
'
24
'
=>
'
PE_ERROR
',
'
25
'
=>
'
PE_PP_CHANGE_AFTER_RESET
',
'
26
'
=>
'
PE_PP_PASSWORD_MOD_NOT_ALLOWED
',
'
27
'
=>
'
PE_PP_MUST_SUPPLY_OLD_PASSWORD
',
'
28
'
=>
'
PE_PP_INSUFFICIENT_PASSWORD_QUALITY
',
'
29
'
=>
'
PE_PP_PASSWORD_TOO_SHORT
',
'
3
'
=>
'
PE_WRONGMANAGERACCOUNT
',
'
30
'
=>
'
PE_PP_PASSWORD_TOO_YOUNG
',
'
31
'
=>
'
PE_PP_PASSWORD_IN_HISTORY
',
'
32
'
=>
'
PE_PP_GRACE
',
'
33
'
=>
'
PE_PP_EXP_WARNING
',
'
34
'
=>
'
PE_PASSWORD_MISMATCH
',
'
36
'
=>
'
PE_NOTIFICATION
',
'
37
'
=>
'
PE_BADURL
',
'
38
'
=>
'
PE_NOSCHEME
',
'
39
'
=>
'
PE_BADOLDPASSWORD
',
'
4
'
=>
'
PE_USERNOTFOUND
',
'
40
'
=>
'
PE_MALFORMEDUSER
',
'
41
'
=>
'
PE_SESSIONNOTGRANTED
',
'
42
'
=>
'
PE_CONFIRM
',
'
43
'
=>
'
PE_MAILFORMEMPTY
',
'
44
'
=>
'
PE_BADMAILTOKEN
',
'
45
'
=>
'
PE_MAILERROR
',
'
46
'
=>
'
PE_MAILOK
',
'
48
'
=>
'
PE_SAML_ERROR
',
'
49
'
=>
'
PE_SAML_LOAD_SERVICE_ERROR
',
'
5
'
=>
'
PE_BADCREDENTIALS
',
'
50
'
=>
'
PE_SAML_LOAD_IDP_ERROR
',
'
51
'
=>
'
PE_SAML_SSO_ERROR
',
'
52
'
=>
'
PE_SAML_UNKNOWN_ENTITY
',
'
53
'
=>
'
PE_SAML_DESTINATION_ERROR
',
'
54
'
=>
'
PE_SAML_CONDITIONS_ERROR
',
'
55
'
=>
'
PE_SAML_IDPSSOINITIATED_NOTALLOWED
',
'
56
'
=>
'
PE_SAML_SLO_ERROR
',
'
57
'
=>
'
PE_SAML_SIGNATURE_ERROR
',
'
58
'
=>
'
PE_SAML_ART_ERROR
',
'
59
'
=>
'
PE_SAML_SESSION_ERROR
',
'
6
'
=>
'
PE_LDAPCONNECTFAILED
',
'
60
'
=>
'
PE_SAML_LOAD_SP_ERROR
',
'
61
'
=>
'
PE_SAML_ATTR_ERROR
',
'
62
'
=>
'
PE_OPENID_EMPTY
',
'
63
'
=>
'
PE_OPENID_BADID
',
'
64
'
=>
'
PE_MISSINGREQATTR
',
'
65
'
=>
'
PE_BADPARTNER
',
'
66
'
=>
'
PE_MAILCONFIRMATION_ALREADY_SENT
',
'
67
'
=>
'
PE_PASSWORDFORMEMPTY
',
'
68
'
=>
'
PE_CAS_SERVICE_NOT_ALLOWED
',
'
69
'
=>
'
PE_MAILFIRSTACCESS
',
'
7
'
=>
'
PE_LDAPERROR
',
'
70
'
=>
'
PE_MAILNOTFOUND
',
'
71
'
=>
'
PE_PASSWORDFIRSTACCESS
',
'
72
'
=>
'
PE_MAILCONFIRMOK
',
'
73
'
=>
'
PE_RADIUSCONNECTFAILED
',
'
74
'
=>
'
PE_MUST_SUPPLY_OLD_PASSWORD
',
'
75
'
=>
'
PE_FORBIDDENIP
',
'
76
'
=>
'
PE_CAPTCHAERROR
',
'
77
'
=>
'
PE_CAPTCHAEMPTY
',
'
78
'
=>
'
PE_REGISTERFIRSTACCESS
',
'
79
'
=>
'
PE_REGISTERFORMEMPTY
',
'
8
'
=>
'
PE_APACHESESSIONERROR
',
'
80
'
=>
'
PE_REGISTERALREADYEXISTS
',
'
81
'
=>
'
PE_NOTOKEN
',
'
82
'
=>
'
PE_TOKENEXPIRED
',
'
83
'
=>
'
PE_U2FFAILED
',
'
84
'
=>
'
PE_UNAUTHORIZEDPARTNER
',
'
85
'
=>
'
PE_RENEWSESSION
',
'
86
'
=>
'
PE_WAIT
',
'
87
'
=>
'
PE_MUSTAUTHN
',
'
88
'
=>
'
PE_MUSTHAVEMAIL
',
'
89
'
=>
'
PE_SAML_SERVICE_NOT_ALLOWED
',
'
9
'
=>
'
PE_FIRSTACCESS
',
'
90
'
=>
'
PE_OIDC_SERVICE_NOT_ALLOWED
',
'
91
'
=>
'
PE_OID_SERVICE_NOT_ALLOWED
',
'
92
'
=>
'
PE_GET_SERVICE_NOT_ALLOWED
',
'
93
'
=>
'
PE_IMPERSONATION_SERVICE_NOT_ALLOWED
',
'
94
'
=>
'
PE_ISSUERMISSINGREQATTR
'
};