File: OnlyOne.pm

package info (click to toggle)
libcatalyst-authentication-credential-authen-simple-perl 0.09-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 228 kB
  • ctags: 26
  • sloc: perl: 305; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Authen::Simple::OnlyOne;

use strict;
use warnings;
use base 'Authen::Simple::Adapter';

use Params::Validate    qw[];

__PACKAGE__->options({
    pass => {
        type     => Params::Validate::SCALAR,
        optional => 0 
    }
});

sub check {
    my ( $self, $username, $password ) = @_;

    return ($password eq $self->pass);
}
1;