lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/Demo.pm
2021-02-10 22:27:12 +01:00

32 lines
542 B
Perl

package Lemonldap::NG::Portal::Password::Demo;
use strict;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_ERROR
PE_PASSWORD_OK
);
extends 'Lemonldap::NG::Portal::Password::Base';
our $VERSION = '2.0.12';
sub init {
my ($self) = @_;
return $self->SUPER::init;
}
sub confirm {
my ( $self, $req, $pwd ) = @_;
return ( $pwd eq $req->{sessionInfo}->{uid} );
}
sub modifyPassword {
my ( $self, $req, $pwd ) = @_;
# Nothing to do here, all new passwords are accepted
return PE_PASSWORD_OK;
}
1;