« blib/lib/OpusVL/AppKit/RolesFor/Schema/LDAPAuth.pm
↑ Summary
blib/lib/OpusVL/AppKit/TraitFor/Controller/Login/SetHomePageFlag.pm »
| 1 | package OpusVL::AppKit::TraitFor::Controller::Login::NewSessionIdOnLogin; | ||
| 2 | |||
| 3 | 11 | ▶ | use MooseX::MethodAttributes::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 11 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 11 | requires qw/ | |
| 7 | login | ||
| 8 | login_form_stash_key | ||
| 9 | /; | ||
| 10 | |||
| 11 | after 'login' => sub { | ||
| 12 | 19 | ▶ | my ( $self, $ctx ) = @_; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 19 | $ctx->change_session_id; | |
| 15 | 11 | }; | |
| 16 | |||
| 17 | 11 | 1; | |
| 18 | |||
| 19 | __END__ | ||
| 20 | |||
| 21 | =pod | ||
| 22 | |||
| 23 | =encoding UTF-8 | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | OpusVL::AppKit::TraitFor::Controller::Login::NewSessionIdOnLogin | ||
| 28 | |||
| 29 | =head1 VERSION | ||
| 30 | |||
| 31 | version 2.24 | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | Simple controller role to generate a new session id when the user | ||
| 36 | logs in. Actually it's a little blunter than that, it forces a new | ||
| 37 | one to be generated every time the login page is visited. That's | ||
| 38 | not a problem, even if it is a little pointless. It's just this | ||
| 39 | is the simplest place to hook in the functionality. | ||
| 40 | |||
| 41 | =head1 NAME | ||
| 42 | |||
| 43 | OpusVL::AppKit::TraitFor::Controller::Login::NewSessionIdOnLogin | ||
| 44 | |||
| 45 | =head1 METHODS | ||
| 46 | |||
| 47 | =head2 after 'login' | ||
| 48 | |||
| 49 | $ctx->change_session_id; | ||
| 50 | |||
| 51 | =head1 SEE ALSO | ||
| 52 | |||
| 53 | =over | ||
| 54 | |||
| 55 | =item L<CatalystX::SimpleLogin::ControllerRole::Login> | ||
| 56 | |||
| 57 | =back | ||
| 58 | |||
| 59 | =head1 AUTHOR | ||
| 60 | |||
| 61 | OpusVL - www.opusvl.com | ||
| 62 | |||
| 63 | =head1 COPYRIGHT AND LICENSE | ||
| 64 | |||
| 65 | This software is copyright (c) 2010 by OpusVL - www.opusvl.com. | ||
| 66 | |||
| 67 | This is free software; you can redistribute it and/or modify it under | ||
| 68 | the same terms as the Perl 5 programming language system itself. | ||
| 69 | |||
| 70 | =cut | ||