| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 1 |  |  | 1 |  | 329 | use strict; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 39 |  | 
| 2 |  |  |  |  |  |  | package Web::Authenticate::Digest::Role; | 
| 3 |  |  |  |  |  |  | $Web::Authenticate::Digest::Role::VERSION = '0.002'; | 
| 4 | 1 |  |  | 1 |  | 371 | use Mouse::Role; | 
|  | 1 |  |  |  |  | 769 |  | 
|  | 1 |  |  |  |  | 3 |  | 
| 5 |  |  |  |  |  |  | #ABSTRACT: A Mouse::Role that defines what methods a Web::Authenticate::Digest object should contain. | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | requires 'generate'; | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | requires 'validate'; | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | 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 |