GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect(3) User Contributed Perl Documentation CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect(3)

CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect - redirect users who login back to the page they originally requested.

    package MyApp::Controller::NeedsAuth;

    use Moose;
    use namespace::autoclean;

    # One needs to inherit from Catalyst::Controller in order
    # to get the Does('NeedsLogin') functionality.
    BEGIN { extends 'Catalyst::Controller'; }

    sub inbox : Path Does('NeedsLogin') {
        # Redirects to /login if not logged in
        my ($self, $c) = @_;

        $c->stash->{template} = "inbox.tt2";

        return;
    }

    # Turn on in config
    MyApp->config('Contoller::Login' => { traits => 'WithRedirect' });

Provides the "login" action with a wrapper to redirect to a page which needs authentication, from which the user was previously redirected. Goes hand in hand with Catalyst::ActionRole::NeedsLogin

Make it use and extract "$c->session->{redirect_to_after_login}" if it exists.

This sets the error message to $message and sets "$c->session->{redirect_to_after_login}" to the current URL.

CatalystX::SimpleLogin::Controller::Login
CatalystX::SimpleLogin::Form::Login

See CatalystX::SimpleLogin for authors.

See CatalystX::SimpleLogin for license.
2017-06-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.