diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm index 0de1d5f85..cda2577ba 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm @@ -14,7 +14,15 @@ sub init { sub extractFormInfo { my ( $self, $req ) = @_; - $self->checkChoice($req) or return PE_FIRSTACCESS; + unless ( $self->checkChoice($req) ) { + foreach my $mod ( values %{ $self->modules } ) { + if ( $mod->can('setSecurity') ) { + $mod->setSecurity($req); + last; + } + } + return PE_FIRSTACCESS; + } return $req->datas->{enabledMods0}->[0]->extractFormInfo($req); } @@ -31,9 +39,4 @@ sub authLogout { return $_[1]->datas->{enabledMods0}->[0]->authLogout( $_[1] ); } -sub getDisplayType { - $_[0]->checkChoice( $_[1] ) or return PE_OK; - return $_[1]->datas->{enabledMods0}->[0]->getDisplayType( $_[1] ); -} - 1; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm index 82986c6a9..a7eb81bb6 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm @@ -296,7 +296,7 @@ sub display { else { # Authentication loop - if ( $req->sessionInfo->{_choice} + if ( $self->conf->{authentication} eq 'Choice' and my $authLoop = $self->_buildAuthLoop($req) ) { %templateParams = (