« blib/lib/Web/Authenticate/Result/Login.pm
↑ Summary
blib/lib/Web/Authenticate/Session/Handler/Role.pm »
| 1 | use strict; | ||
| 2 | package Web::Authenticate::Session; | ||
| 3 | $Web::Authenticate::Session::VERSION = '0.004'; | ||
| 4 | use Mouse; | ||
| 5 | use Session::Token; | ||
| 6 | #ABSTRACT: The default implementation of Web::Authenticate::Session::Role. | ||
| 7 | |||
| 8 | |||
| 9 | has id => ( | ||
| 10 | isa => 'Str', | ||
| 11 | is => 'ro', | ||
| 12 | required => 1, | ||
| 13 | ); | ||
| 14 | |||
| 15 | |||
| 16 | has expires => ( | ||
| 17 | is => 'ro', | ||
| 18 | required => 1, | ||
| 19 | ); | ||
| 20 | |||
| 21 | |||
| 22 | has user => ( | ||
| 23 | does => 'Web::Authenticate::User::Role', | ||
| 24 | is => 'ro', | ||
| 25 | required => 1, | ||
| 26 | ); | ||
| 27 | |||
| 28 | # here so that above methods exist | ||
| 29 | with 'Web::Authenticate::Session::Role'; | ||
| 30 | |||
| 31 | |||
| 32 | has row => ( | ||
| 33 | isa => 'HashRef', | ||
| 34 | is => 'ro', | ||
| 35 | required => 1, | ||
| 36 | ); | ||
| 37 | |||
| 38 | 1; | ||
| 39 | |||
| 40 | __END__ | ||
| 41 | |||
| 42 | =pod | ||
| 43 | |||
| 44 | =encoding UTF-8 | ||
| 45 | |||
| 46 | =head1 NAME | ||
| 47 | |||
| 48 | Web::Authenticate::Session - The default implementation of Web::Authenticate::Session::Role. | ||
| 49 | |||
| 50 | =head1 VERSION | ||
| 51 | |||
| 52 | version 0.004 | ||
| 53 | |||
| 54 | =head1 METHODS | ||
| 55 | |||
| 56 | =head2 id | ||
| 57 | |||
| 58 | Returns the session id. | ||
| 59 | |||
| 60 | =head2 expires | ||
| 61 | |||
| 62 | Returns the expiration time of this session. | ||
| 63 | |||
| 64 | =head2 user | ||
| 65 | |||
| 66 | Returns the user for this session | ||
| 67 | |||
| 68 | =head2 row | ||
| 69 | |||
| 70 | Has the user row as a hashref with columns as keys. | ||
| 71 | |||
| 72 | =head1 AUTHOR | ||
| 73 | |||
| 74 | Adam Hopkins <srchulo@cpan.org> | ||
| 75 | |||
| 76 | =head1 COPYRIGHT AND LICENSE | ||
| 77 | |||
| 78 | This software is copyright (c) 2017 by Adam Hopkins. | ||
| 79 | |||
| 80 | This is free software; you can redistribute it and/or modify it under | ||
| 81 | the same terms as the Perl 5 programming language system itself. | ||
| 82 | |||
| 83 | =cut |