Merge branch 'v2.0'
This commit is contained in:
commit
8b5387a48b
|
@ -8,6 +8,7 @@ use POSIX qw(setuid setgid);
|
||||||
use JSON qw(to_json);
|
use JSON qw(to_json);
|
||||||
use IO::Select;
|
use IO::Select;
|
||||||
use IO::Socket::INET;
|
use IO::Socket::INET;
|
||||||
|
use Lemonldap::NG::Handler::Lib::StatusConstants qw(portalConsts);
|
||||||
|
|
||||||
our $VERSION = '2.1.0';
|
our $VERSION = '2.1.0';
|
||||||
|
|
||||||
|
@ -18,97 +19,6 @@ use constant MN_COUNT => 5;
|
||||||
|
|
||||||
our $page_title = 'Lemonldap::NG statistics';
|
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 {
|
eval {
|
||||||
setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] );
|
setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] );
|
||||||
setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] );
|
setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] );
|
||||||
|
@ -158,7 +68,7 @@ sub run {
|
||||||
my ( $user, $uri, $code ) = ( $1, $2, $3 );
|
my ( $user, $uri, $code ) = ( $1, $2, $3 );
|
||||||
|
|
||||||
# Portal error translation
|
# Portal error translation
|
||||||
$code = portalTab->{$code} || $code if ( $code =~ /^\-?\d+$/ );
|
$code = portalConsts->{$code} || $code if ( $code =~ /^\-?\d+$/ );
|
||||||
|
|
||||||
# Per user activity
|
# Per user activity
|
||||||
$status->{user}->{$user}->{$code}++;
|
$status->{user}->{$user}->{$code}++;
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
# 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;
|
|
@ -11,6 +11,7 @@ lib/Lemonldap/NG/Manager/Attributes.pm
|
||||||
lib/Lemonldap/NG/Manager/Build.pm
|
lib/Lemonldap/NG/Manager/Build.pm
|
||||||
lib/Lemonldap/NG/Manager/Build/Attributes.pm
|
lib/Lemonldap/NG/Manager/Build/Attributes.pm
|
||||||
lib/Lemonldap/NG/Manager/Build/CTrees.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/Build/Tree.pm
|
||||||
lib/Lemonldap/NG/Manager/Cli.pm
|
lib/Lemonldap/NG/Manager/Cli.pm
|
||||||
lib/Lemonldap/NG/Manager/Cli/Lib.pm
|
lib/Lemonldap/NG/Manager/Cli/Lib.pm
|
||||||
|
|
|
@ -6,6 +6,7 @@ use Mouse;
|
||||||
use Lemonldap::NG::Manager::Build::Attributes;
|
use Lemonldap::NG::Manager::Build::Attributes;
|
||||||
use Lemonldap::NG::Manager::Build::Tree;
|
use Lemonldap::NG::Manager::Build::Tree;
|
||||||
use Lemonldap::NG::Manager::Build::CTrees;
|
use Lemonldap::NG::Manager::Build::CTrees;
|
||||||
|
use Lemonldap::NG::Manager::Build::PortalConstants;
|
||||||
use Lemonldap::NG::Manager::Conf::Zero;
|
use Lemonldap::NG::Manager::Conf::Zero;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use Regexp::Assemble;
|
use Regexp::Assemble;
|
||||||
|
@ -13,14 +14,16 @@ use JSON;
|
||||||
use Getopt::Std;
|
use Getopt::Std;
|
||||||
use IO::String;
|
use IO::String;
|
||||||
|
|
||||||
has structFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has structFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has confTreeFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has confTreeFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has managerConstantsFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has managerConstantsFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has managerAttributesFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has managerAttributesFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has defaultValuesFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has defaultValuesFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has confConstantsFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has confConstantsFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has firstLmConfFile => ( isa => 'Str', is => 'ro', required => 1 );
|
has firstLmConfFile => ( isa => 'Str', is => 'ro', required => 1 );
|
||||||
has reverseTreeFile => ( 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 @managerAttrKeys = qw(keyTest keyMsgFail select type test msgFail default);
|
||||||
my $format = 'Creating %-69s: ';
|
my $format = 'Creating %-69s: ';
|
||||||
|
@ -408,7 +411,9 @@ $managerAttr}
|
||||||
$jsonEnc->pretty(0);
|
$jsonEnc->pretty(0);
|
||||||
print F $jsonEnc->encode($reverseScanResult);
|
print F $jsonEnc->encode($reverseScanResult);
|
||||||
close F;
|
close F;
|
||||||
|
|
||||||
print STDERR "done\n";
|
print STDERR "done\n";
|
||||||
|
$self->buildPortalConstants();
|
||||||
}
|
}
|
||||||
|
|
||||||
sub buildZeroConf {
|
sub buildZeroConf {
|
||||||
|
@ -426,6 +431,105 @@ sub buildZeroConf {
|
||||||
print STDERR "done\n";
|
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 {
|
sub mydump {
|
||||||
my ( $obj, $subname ) = @_;
|
my ( $obj, $subname ) = @_;
|
||||||
my $t = Dumper($obj);
|
my $t = Dumper($obj);
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
# 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;
|
|
@ -1,3 +1,4 @@
|
||||||
|
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
|
||||||
package Lemonldap::NG::Portal::Main::Constants;
|
package Lemonldap::NG::Portal::Main::Constants;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -7,9 +8,6 @@ our $VERSION = '2.1.0';
|
||||||
|
|
||||||
use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::Main';
|
use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::Main';
|
||||||
use constant {
|
use constant {
|
||||||
|
|
||||||
# Portal errors
|
|
||||||
# Developers warning, do not use PE_INFO, it's reserved to autoRedirect.
|
|
||||||
PE_LOGOUT_OK => -7,
|
PE_LOGOUT_OK => -7,
|
||||||
PE_PASSWORD_OK => -6,
|
PE_PASSWORD_OK => -6,
|
||||||
PE_IDPCHOICE => -5,
|
PE_IDPCHOICE => -5,
|
||||||
|
@ -102,33 +100,196 @@ use constant {
|
||||||
PE_ISSUERMISSINGREQATTR => 94,
|
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'
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# EXPORTER PARAMETERS
|
# EXPORTER PARAMETERS
|
||||||
our @EXPORT_OK = qw( PE_SENDRESPONSE PE_INFO PE_REDIRECT PE_DONE PE_OK
|
our @EXPORT_OK = (
|
||||||
PE_SESSIONEXPIRED PE_FORMEMPTY PE_WRONGMANAGERACCOUNT PE_USERNOTFOUND
|
'portalConsts',
|
||||||
PE_BADCREDENTIALS PE_LDAPCONNECTFAILED PE_LDAPERROR PE_APACHESESSIONERROR
|
'HANDLER',
|
||||||
PE_FIRSTACCESS PE_BADCERTIFICATE PE_PP_ACCOUNT_LOCKED PE_PP_PASSWORD_EXPIRED
|
'PE_LOGOUT_OK',
|
||||||
PE_CERTIFICATEREQUIRED PE_ERROR PE_PP_CHANGE_AFTER_RESET
|
'PE_PASSWORD_OK',
|
||||||
PE_PP_PASSWORD_MOD_NOT_ALLOWED PE_PP_MUST_SUPPLY_OLD_PASSWORD
|
'PE_IDPCHOICE',
|
||||||
PE_PP_INSUFFICIENT_PASSWORD_QUALITY PE_PP_PASSWORD_TOO_SHORT
|
'PE_SENDRESPONSE',
|
||||||
PE_PP_PASSWORD_TOO_YOUNG PE_PP_PASSWORD_IN_HISTORY PE_PP_GRACE
|
'PE_INFO',
|
||||||
PE_PP_EXP_WARNING PE_PASSWORD_MISMATCH PE_PASSWORD_OK PE_NOTIFICATION
|
'PE_REDIRECT',
|
||||||
PE_BADURL PE_NOSCHEME PE_BADOLDPASSWORD PE_MALFORMEDUSER PE_SESSIONNOTGRANTED
|
'PE_DONE',
|
||||||
PE_CONFIRM PE_MAILFORMEMPTY PE_BADMAILTOKEN PE_MAILERROR PE_MAILOK
|
'PE_OK',
|
||||||
PE_LOGOUT_OK PE_SAML_ERROR PE_SAML_LOAD_SERVICE_ERROR PE_SAML_LOAD_IDP_ERROR
|
'PE_SESSIONEXPIRED',
|
||||||
PE_SAML_SSO_ERROR PE_SAML_UNKNOWN_ENTITY PE_SAML_DESTINATION_ERROR
|
'PE_FORMEMPTY',
|
||||||
PE_SAML_CONDITIONS_ERROR PE_SAML_IDPSSOINITIATED_NOTALLOWED PE_SAML_SLO_ERROR
|
'PE_WRONGMANAGERACCOUNT',
|
||||||
PE_SAML_SIGNATURE_ERROR PE_SAML_ART_ERROR PE_SAML_SESSION_ERROR
|
'PE_USERNOTFOUND',
|
||||||
PE_SAML_LOAD_SP_ERROR PE_SAML_ATTR_ERROR PE_OPENID_EMPTY PE_OPENID_BADID
|
'PE_BADCREDENTIALS',
|
||||||
PE_MISSINGREQATTR PE_BADPARTNER PE_MAILCONFIRMATION_ALREADY_SENT
|
'PE_LDAPCONNECTFAILED',
|
||||||
PE_PASSWORDFORMEMPTY PE_CAS_SERVICE_NOT_ALLOWED PE_MAILFIRSTACCESS
|
'PE_LDAPERROR',
|
||||||
PE_MAILNOTFOUND PE_PASSWORDFIRSTACCESS PE_MAILCONFIRMOK
|
'PE_APACHESESSIONERROR',
|
||||||
PE_RADIUSCONNECTFAILED PE_MUST_SUPPLY_OLD_PASSWORD PE_FORBIDDENIP
|
'PE_FIRSTACCESS',
|
||||||
PE_CAPTCHAERROR PE_CAPTCHAEMPTY PE_REGISTERFIRSTACCESS PE_REGISTERFORMEMPTY
|
'PE_BADCERTIFICATE',
|
||||||
PE_REGISTERALREADYEXISTS PE_NOTOKEN PE_TOKENEXPIRED HANDLER PE_U2FFAILED
|
'PE_PP_ACCOUNT_LOCKED',
|
||||||
PE_UNAUTHORIZEDPARTNER PE_RENEWSESSION PE_IDPCHOICE PE_WAIT PE_MUSTAUTHN
|
'PE_PP_PASSWORD_EXPIRED',
|
||||||
PE_MUSTHAVEMAIL PE_SAML_SERVICE_NOT_ALLOWED PE_OIDC_SERVICE_NOT_ALLOWED
|
'PE_CERTIFICATEREQUIRED',
|
||||||
PE_OID_SERVICE_NOT_ALLOWED PE_GET_SERVICE_NOT_ALLOWED PE_IMPERSONATION_SERVICE_NOT_ALLOWED
|
'PE_ERROR',
|
||||||
PE_ISSUERMISSINGREQATTR
|
'PE_PP_CHANGE_AFTER_RESET',
|
||||||
|
'PE_PP_PASSWORD_MOD_NOT_ALLOWED',
|
||||||
|
'PE_PP_MUST_SUPPLY_OLD_PASSWORD',
|
||||||
|
'PE_PP_INSUFFICIENT_PASSWORD_QUALITY',
|
||||||
|
'PE_PP_PASSWORD_TOO_SHORT',
|
||||||
|
'PE_PP_PASSWORD_TOO_YOUNG',
|
||||||
|
'PE_PP_PASSWORD_IN_HISTORY',
|
||||||
|
'PE_PP_GRACE',
|
||||||
|
'PE_PP_EXP_WARNING',
|
||||||
|
'PE_PASSWORD_MISMATCH',
|
||||||
|
'PE_NOTIFICATION',
|
||||||
|
'PE_BADURL',
|
||||||
|
'PE_NOSCHEME',
|
||||||
|
'PE_BADOLDPASSWORD',
|
||||||
|
'PE_MALFORMEDUSER',
|
||||||
|
'PE_SESSIONNOTGRANTED',
|
||||||
|
'PE_CONFIRM',
|
||||||
|
'PE_MAILFORMEMPTY',
|
||||||
|
'PE_BADMAILTOKEN',
|
||||||
|
'PE_MAILERROR',
|
||||||
|
'PE_MAILOK',
|
||||||
|
'PE_SAML_ERROR',
|
||||||
|
'PE_SAML_LOAD_SERVICE_ERROR',
|
||||||
|
'PE_SAML_LOAD_IDP_ERROR',
|
||||||
|
'PE_SAML_SSO_ERROR',
|
||||||
|
'PE_SAML_UNKNOWN_ENTITY',
|
||||||
|
'PE_SAML_DESTINATION_ERROR',
|
||||||
|
'PE_SAML_CONDITIONS_ERROR',
|
||||||
|
'PE_SAML_IDPSSOINITIATED_NOTALLOWED',
|
||||||
|
'PE_SAML_SLO_ERROR',
|
||||||
|
'PE_SAML_SIGNATURE_ERROR',
|
||||||
|
'PE_SAML_ART_ERROR',
|
||||||
|
'PE_SAML_SESSION_ERROR',
|
||||||
|
'PE_SAML_LOAD_SP_ERROR',
|
||||||
|
'PE_SAML_ATTR_ERROR',
|
||||||
|
'PE_OPENID_EMPTY',
|
||||||
|
'PE_OPENID_BADID',
|
||||||
|
'PE_MISSINGREQATTR',
|
||||||
|
'PE_BADPARTNER',
|
||||||
|
'PE_MAILCONFIRMATION_ALREADY_SENT',
|
||||||
|
'PE_PASSWORDFORMEMPTY',
|
||||||
|
'PE_CAS_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_MAILFIRSTACCESS',
|
||||||
|
'PE_MAILNOTFOUND',
|
||||||
|
'PE_PASSWORDFIRSTACCESS',
|
||||||
|
'PE_MAILCONFIRMOK',
|
||||||
|
'PE_RADIUSCONNECTFAILED',
|
||||||
|
'PE_MUST_SUPPLY_OLD_PASSWORD',
|
||||||
|
'PE_FORBIDDENIP',
|
||||||
|
'PE_CAPTCHAERROR',
|
||||||
|
'PE_CAPTCHAEMPTY',
|
||||||
|
'PE_REGISTERFIRSTACCESS',
|
||||||
|
'PE_REGISTERFORMEMPTY',
|
||||||
|
'PE_REGISTERALREADYEXISTS',
|
||||||
|
'PE_NOTOKEN',
|
||||||
|
'PE_TOKENEXPIRED',
|
||||||
|
'PE_U2FFAILED',
|
||||||
|
'PE_UNAUTHORIZEDPARTNER',
|
||||||
|
'PE_RENEWSESSION',
|
||||||
|
'PE_WAIT',
|
||||||
|
'PE_MUSTAUTHN',
|
||||||
|
'PE_MUSTHAVEMAIL',
|
||||||
|
'PE_SAML_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_OIDC_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_OID_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_GET_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_IMPERSONATION_SERVICE_NOT_ALLOWED',
|
||||||
|
'PE_ISSUERMISSINGREQATTR'
|
||||||
);
|
);
|
||||||
our %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, 'import' ], );
|
our %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, 'import' ], );
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ package Lemonldap::NG::Portal::Main;
|
||||||
use strict;
|
use strict;
|
||||||
use MIME::Base64;
|
use MIME::Base64;
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
|
use Lemonldap::NG::Portal::Main::Constants qw(portalConsts);
|
||||||
|
|
||||||
# Main method
|
# Main method
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -38,7 +39,9 @@ sub process {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$self->logger->debug("Returned error: $err") if ($err);
|
$self->logger->debug(
|
||||||
|
"Returned error: $err (" . portalConsts->{$err} . ")" )
|
||||||
|
if ($err);
|
||||||
return $err;
|
return $err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,7 @@ Lemonldap::NG::Manager::Build->run(
|
||||||
confConstantsFile => 'lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm',
|
confConstantsFile => 'lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm',
|
||||||
firstLmConfFile => '_example/conf/lmConf-1.json',
|
firstLmConfFile => '_example/conf/lmConf-1.json',
|
||||||
reverseTreeFile => 'lemonldap-ng-manager/site/htdocs/static/reverseTree.json',
|
reverseTreeFile => 'lemonldap-ng-manager/site/htdocs/static/reverseTree.json',
|
||||||
|
portalConstantsFile => 'lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm',
|
||||||
|
handlerStatusConstantsFile => 'lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/StatusConstants.pm',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user