Catalyst::ActionRole::NeedsLogin - checks if a user is logged in and if not redirects him to lögin page
package MyApp::Controller::NeedsAuth; sub something : Path Does('NeedsLogin') { # Redirects to /login if not logged in } sub something : Path Does('NeedsLogin') :LoginRedirectMessage('Your custom Message') { # Redirects to /login if not logged in- } # Turn on in config MyApp->config('Contoller::Login' => { traits => ['WithRedirect'] });
Provides a ActionRole for forcing the user to login.
-head1 WRAPPED METHODS
FIXME
See CatalystX::SimpleLogin for authors.
See CatalystX::SimpleLogin for license.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'lögin'. Assuming CP1252
To install CatalystX::SimpleLogin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::SimpleLogin
CPAN shell
perl -MCPAN -e shell install CatalystX::SimpleLogin
For more information on module installation, please visit the detailed CPAN module installation guide.