Special workaround in AuthChoice for captcha (#645)

This commit is contained in:
Clément Oudot 2013-11-06 16:33:26 +00:00
parent fb82ce9522
commit bf3cf444fb

View File

@ -8,7 +8,7 @@ package Lemonldap::NG::Portal::_Choice;
use Lemonldap::NG::Portal::Simple;
our $VERSION = '1.3.0';
our $VERSION = '1.3.1';
## @cmethod Lemonldap::NG::Portal::_Choice new(Lemonldap::NG::Portal::Simple portal)
# Constructor
@ -32,6 +32,13 @@ sub new {
$portal->{_authChoice} = "";
}
# Special workaround for Captcha
# Init Captcha to have it displayed even if no choice already done
if ( $portal->{captcha_login_enabled} ) {
eval { $portal->initCaptcha(); };
$portal->lmLog( "Can't init captcha: $@", "error" ) if $@;
}
# Special workaround for SAML
# because we cannot easily set SSO return URL
# and SLO URL with authChoice parameter