lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Password/Demo.pm

32 lines
534 B
Perl
Raw Normal View History

2016-07-07 23:55:23 +02:00
package Lemonldap::NG::Portal::Password::Demo;
use strict;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_ERROR
PE_PASSWORD_OK
);
2016-07-07 23:55:23 +02:00
extends 'Lemonldap::NG::Portal::Password::Base';
2016-07-12 07:15:26 +02:00
our $VERSION = '2.0.0';
2016-07-07 23:55:23 +02:00
sub init {
my ($self) = @_;
2017-01-30 22:35:37 +01:00
return $self->SUPER::init;
2016-07-07 23:55:23 +02:00
}
sub confirm {
my ( $self, $req, $pwd ) = @_;
return ( $pwd eq $req->{sessionInfo}->{uid} );
}
sub modifyPassword {
2016-07-18 21:38:14 +02:00
my ( $self, $req, $pwd ) = @_;
2016-07-07 23:55:23 +02:00
# Nothing to do here, all new passwords are accepted
PE_PASSWORD_OK;
2016-07-07 23:55:23 +02:00
}
2016-07-12 07:15:26 +02:00
1;