lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm

40 lines
913 B
Perl
Raw Normal View History

2016-06-30 22:42:50 +02:00
package Lemonldap::NG::Portal::Auth::Choice;
use strict;
use Mouse;
2016-07-02 10:51:00 +02:00
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_FIRSTACCESS);
2016-06-30 22:42:50 +02:00
2017-02-28 21:53:19 +01:00
our $VERSION = '2.0.0';
2016-06-30 22:42:50 +02:00
extends 'Lemonldap::NG::Portal::Lib::Choice';
sub init {
return $_[0]->SUPER::init(0);
}
sub extractFormInfo {
my ( $self, $req ) = @_;
$self->checkChoice($req) or return PE_FIRSTACCESS;
2016-07-02 21:09:45 +02:00
return $req->datas->{enabledMods0}->[0]->extractFormInfo($req);
2016-06-30 22:42:50 +02:00
}
sub authenticate {
2016-07-02 21:09:45 +02:00
return $_[1]->datas->{enabledMods0}->[0]->authenticate( $_[1] );
2016-06-30 22:42:50 +02:00
}
2016-12-01 23:25:05 +01:00
sub setAuthSessionInfo {
return $_[1]->datas->{enabledMods0}->[0]->setAuthSessionInfo( $_[1] );
}
2016-07-18 21:45:05 +02:00
sub authLogout {
2016-07-02 10:51:00 +02:00
$_[0]->checkChoice( $_[1] ) or return PE_OK;
2016-07-18 21:45:05 +02:00
return $_[1]->datas->{enabledMods0}->[0]->authLogout( $_[1] );
2016-06-30 22:42:50 +02:00
}
sub getDisplayType {
2016-07-02 10:51:00 +02:00
$_[0]->checkChoice( $_[1] ) or return PE_OK;
2016-07-02 21:09:45 +02:00
return $_[1]->datas->{enabledMods0}->[0]->getDisplayType( $_[1] );
2016-06-30 22:42:50 +02:00
}
1;