Password/DBI skeleton
This commit is contained in:
parent
03466042ae
commit
07c56321de
|
@ -48,6 +48,7 @@ sub importHandlerDatas {
|
|||
my ( $self, $req ) = @_;
|
||||
$req->{sessionInfo} = HANDLER->datas;
|
||||
$req->id( $req->sessionInfo->{_session_id} );
|
||||
$req->user( $req->sessionInfo->{ $self->conf->{whatToTrace} } );
|
||||
PE_OK;
|
||||
}
|
||||
|
||||
|
|
27
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/DBI.pm
Normal file
27
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/DBI.pm
Normal file
|
@ -0,0 +1,27 @@
|
|||
package Lemonldap::NG::Portal::Password::DBI;
|
||||
|
||||
use strict;
|
||||
use Mouse;
|
||||
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_ERROR);
|
||||
|
||||
extends 'Lemonldap::NG::Portal::Password::Base',
|
||||
'Lemonldap::NG::Portal::Lib::DBI';
|
||||
|
||||
our $VERSION = '2.0.0';
|
||||
|
||||
sub init {
|
||||
my ($self) = @_;
|
||||
return $self->dbh;
|
||||
}
|
||||
|
||||
sub confirm {
|
||||
my ( $self, $req, $pwd ) = @_;
|
||||
return $self->check_password( $req->user, $pwd );
|
||||
}
|
||||
|
||||
sub modifyPassword {
|
||||
my ( $self, $req ) = @_;
|
||||
return $self->modify_password( $req->user, $pwd ) ? PE_OK : PE_ERROR;
|
||||
}
|
||||
|
||||
1;
|
|
@ -6,6 +6,8 @@ use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_ERROR);
|
|||
|
||||
extends 'Lemonldap::NG::Portal::Password::Base';
|
||||
|
||||
our $VERSION = '2.0.0';
|
||||
|
||||
sub init {
|
||||
my ($self) = @_;
|
||||
if ( $self->p->getModule(undef,'auth') eq 'Demo' ) {
|
||||
|
@ -29,4 +31,4 @@ sub modifyPassword {
|
|||
PE_OK;
|
||||
}
|
||||
|
||||
1
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user