| 1 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Web::Authenticate::Digest::Role; | ||
| 3 | 1 | $Web::Authenticate::Digest::Role::VERSION = '0.002'; | |
| 4 | 1 | ▶ | use Mouse::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | #ABSTRACT: A Mouse::Role that defines what methods a Web::Authenticate::Digest object should contain. | ||
| 6 | |||
| 7 | |||
| 8 | 1 | requires 'generate'; | |
| 9 | |||
| 10 | |||
| 11 | 1 | requires 'validate'; | |
| 12 | |||
| 13 | 1 | 1; | |
| 14 | |||
| 15 | __END__ | ||
| 16 | |||
| 17 | =pod | ||
| 18 | |||
| 19 | =encoding UTF-8 | ||
| 20 | |||
| 21 | =head1 NAME | ||
| 22 | |||
| 23 | Web::Authenticate::Digest::Role - A Mouse::Role that defines what methods a Web::Authenticate::Digest object should contain. | ||
| 24 | |||
| 25 | =head1 VERSION | ||
| 26 | |||
| 27 | version 0.002 | ||
| 28 | |||
| 29 | =head1 METHODS | ||
| 30 | |||
| 31 | =head2 generate | ||
| 32 | |||
| 33 | All L</Web::Authenticate::Digest> objects should be able to digest text and return a hashed value. | ||
| 34 | |||
| 35 | my $hash = $digest->generate($password); | ||
| 36 | |||
| 37 | =head2 | ||
| 38 | |||
| 39 | Validates the stored hash for the user against the user entered password. | ||
| 40 | |||
| 41 | if ($digest->validate($hash, $password)) { | ||
| 42 | # success | ||
| 43 | } else { | ||
| 44 | # failure | ||
| 45 | } | ||
| 46 | |||
| 47 | =head1 AUTHOR | ||
| 48 | |||
| 49 | Adam Hopkins <srchulo@cpan.org> | ||
| 50 | |||
| 51 | =head1 COPYRIGHT AND LICENSE | ||
| 52 | |||
| 53 | This software is copyright (c) 2017 by Adam Hopkins. | ||
| 54 | |||
| 55 | This is free software; you can redistribute it and/or modify it under | ||
| 56 | the same terms as the Perl 5 programming language system itself. | ||
| 57 | |||
| 58 | =cut | ||