SAML: change error name to PE_IMG_OK and PE_IMG_NOK
This commit is contained in:
parent
423541455b
commit
4f979bfe22
|
@ -48,9 +48,9 @@ my ( $skinfile, %templateParams );
|
|||
if ( $portal->process() ) {
|
||||
|
||||
# 1.1 Image mode
|
||||
if ( $portal->{error} == PE_INFO_OK || $portal->{error} == PE_INFO_KO ) {
|
||||
if ( $portal->{error} == PE_IMG_OK || $portal->{error} == PE_IMG_NOK ) {
|
||||
$skinfile = $skin_dir . '/common/ok.png';
|
||||
if ( $portal->{error} == PE_INFO_KO ) {
|
||||
if ( $portal->{error} == PE_IMG_NOK ) {
|
||||
$skinfile = $skin_dir . '/common/warning.png';
|
||||
}
|
||||
$portal->printImage($skinfile, 'image/png');
|
||||
|
|
|
@ -175,6 +175,7 @@ sub issuerForUnAuthUser {
|
|||
}
|
||||
|
||||
# 1.3. SLO SOAP replay (send SOAP requests asynchronously)
|
||||
# This URL is used by IMG html tag, and should returned PE_IMG_*
|
||||
if ( $url =~ /^(\Q$saml_slo_url_relay_soap\E)/i ) {
|
||||
|
||||
$self->lmLog( "URL $url detected as a relay service URL", 'debug' );
|
||||
|
@ -229,10 +230,10 @@ sub issuerForUnAuthUser {
|
|||
unless ($rstatus) {
|
||||
$self->lmLog( "Fail to process SOAP logout request to $providerID",
|
||||
'error' );
|
||||
return PE_INFO_KO;
|
||||
return PE_IMG_NOK;
|
||||
}
|
||||
|
||||
return PE_INFO_OK;
|
||||
return PE_IMG_OK;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ use constant {
|
|||
# Portal errors
|
||||
# Developers warning, do not use PE_INFO, it's reserved to autoRedirect.
|
||||
# If you want to send an information, use $self->info('text').
|
||||
PE_INFO_KO => -5,
|
||||
PE_INFO_OK => -4,
|
||||
PE_IMG_NOK => -5,
|
||||
PE_IMG_OK => -4,
|
||||
PE_INFO => -3,
|
||||
PE_REDIRECT => -2,
|
||||
PE_DONE => -1,
|
||||
|
@ -111,7 +111,7 @@ use constant {
|
|||
};
|
||||
|
||||
# EXPORTER PARAMETERS
|
||||
our @EXPORT = qw( PE_INFO_KO PE_INFO_OK PE_INFO PE_REDIRECT PE_DONE PE_OK
|
||||
our @EXPORT = qw( PE_IMG_NOK PE_IMG_OK PE_INFO PE_REDIRECT PE_DONE PE_OK
|
||||
PE_SESSIONEXPIRED PE_FORMEMPTY PE_WRONGMANAGERACCOUNT PE_USERNOTFOUND
|
||||
PE_BADCREDENTIALS PE_LDAPCONNECTFAILED PE_LDAPERROR PE_APACHESESSIONERROR
|
||||
PE_FIRSTACCESS PE_BADCERTIFICATE PE_PP_ACCOUNT_LOCKED PE_PP_PASSWORD_EXPIRED
|
||||
|
|
Loading…
Reference in New Issue
Block a user