35 lines
525 B
Perl
35 lines
525 B
Perl
package Lemonldap::NG::Portal::Auth::DBI;
|
|
|
|
use strict;
|
|
use Mouse;
|
|
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_BADCREDENTIALS);
|
|
|
|
our $VERSION = '2.0.0';
|
|
|
|
extends 'Lemonldap::NG::Portal::Auth::_WebForm',
|
|
'Lemonldap::NG::Portal::Lib::DBI';
|
|
|
|
# INITIALIZATION
|
|
|
|
sub init {
|
|
my ($self) = @_;
|
|
return $self->dbh;
|
|
}
|
|
|
|
# RUNNING METHODS
|
|
|
|
sub authenticate {
|
|
my ( $self, $req ) = @_;
|
|
return $self->check_password($req) ? PE_OK : PE_BADCREDENTIALS;
|
|
}
|
|
|
|
sub authLogout {
|
|
PE_OK;
|
|
}
|
|
|
|
sub authForce {
|
|
0;
|
|
}
|
|
|
|
1;
|