« blib/lib/OpusVL/AppKit/Plugin/AppKit/Node.pm
↑ Summary
blib/lib/OpusVL/AppKit/RolesFor/Schema/LDAPAuth.pm »
| 1 | package OpusVL::AppKit::RolesFor::Auth; | ||
| 2 | |||
| 3 | 3 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 3 | requires 'check_password'; | |
| 6 | |||
| 7 | 3 | 1; | |
| 8 | |||
| 9 | __END__ | ||
| 10 | |||
| 11 | =pod | ||
| 12 | |||
| 13 | =encoding UTF-8 | ||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | OpusVL::AppKit::RolesFor::Auth | ||
| 18 | |||
| 19 | =head1 VERSION | ||
| 20 | |||
| 21 | version 2.24 | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | package FailLogin; | ||
| 26 | use Moose; | ||
| 27 | with 'OpusVL::AppKit::RolesFor::Auth'; | ||
| 28 | |||
| 29 | sub check_password | ||
| 30 | { | ||
| 31 | my ($self, $user, $password) = @_; | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | This role is used to supply a method for authenticating a users password. | ||
| 38 | |||
| 39 | =head1 NAME | ||
| 40 | |||
| 41 | OpusVL::AppKit::RolesFor::Auth | ||
| 42 | |||
| 43 | =head1 METHODS | ||
| 44 | |||
| 45 | =head2 check_password | ||
| 46 | |||
| 47 | The role expects the classes that support it to implement the check_password method | ||
| 48 | which should take a username and password and return 0 or 1 depending on whether the | ||
| 49 | password is correct. | ||
| 50 | |||
| 51 | $obj->check_password('user', 'password'); # return 0 or 1 | ||
| 52 | |||
| 53 | =head1 SEE ALSO | ||
| 54 | |||
| 55 | See L<OpusVL::AppKit::LDAPAuth> for an example of this role in use. | ||
| 56 | |||
| 57 | =head1 AUTHOR | ||
| 58 | |||
| 59 | OpusVL - www.opusvl.com | ||
| 60 | |||
| 61 | =head1 COPYRIGHT AND LICENSE | ||
| 62 | |||
| 63 | This software is copyright (c) 2010 by OpusVL - www.opusvl.com. | ||
| 64 | |||
| 65 | This is free software; you can redistribute it and/or modify it under | ||
| 66 | the same terms as the Perl 5 programming language system itself. | ||
| 67 | |||
| 68 | =cut | ||