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::Controller::Login(3) User Contributed Perl Documentation CatalystX::SimpleLogin::Controller::Login(3)

CatalystX::SimpleLogin::Controller::Login - Configurable login controller

    # For simple useage exmple, see CatalystX::SimpleLogin, this is a
    # full config example
    __PACKAGE__->config(
        'Controller::Login' => {
            traits => [
                'WithRedirect', # Optional, enables redirect-back feature
                '-RenderAsTTTemplate', # Optional, allows you to use your own template
            ],
            actions => {
                login => { # Also optional
                    PathPart => ['theloginpage'], # Change login action to /theloginpage
                },
            },
        },
    );

See CatalystX::SimpleLogin::Form::Login for configuring the form.

Controller base class which exists to have login roles composed onto it for the login and logout actions.

A class attribute containing the class of the form to be initialised. One can override it in a derived class with the class of a new form, possibly subclassing CatalystX::SimpleLogin::Form::Login. For example:

    package MyApp::Controller::Login;

    use Moose;

    extends('CatalystX::SimpleLogin::Controller::Login');

    has '+login_form_class' => (
        default => "MyApp::Form::Login",
    );

    1;

An attribute containing an array reference of roles to be consumed by the form. One can override it in a similar way to "login_form_class":

    package MyApp::Controller::Login;

    use Moose;

    extends('CatalystX::SimpleLogin::Controller::Login');

    has '+login_form_class_roles' => (
        default => sub { [qw(MyApp::FormRole::Foo MyApp::FormRole::Bar)] },
    );

    1;

Cause form instance to be built at application startup.

This method does a post-login redirect. TODO for BOBTFISH - should it even be public? If it does need to be public, then document it because the Pod coverage test failed.

Login action.

Redirect to the login action.

Displays the login form

Processes a submitted login form, and if correct, logs the user in and redirects

A stub action that is anchored at the root of the site ("/") and does not require registration (hence the name).

If you are using WithRedirect (i.e. by default), then this method is overridden to redirect the user back to the page they initially hit which required authentication.

Note that even if the original URI was a post, then the redirect back will only be a GET.

If you choose NOT to compose the WithRedirect trait, then you can set the uri users are redirected to with the "redirect_after_login_uri" config key, or by overriding the redirect_after_login_uri method in your own login controller if you need custom logic.

Renders the login form. By default it just calls the form's render method. If you want to do something different, like rendering the form with a template through your view, this is the place to hook into.

A stub action that is anchored at the root of the site ("/") and does require registration (hence the name).

An action that is called to deal with whether the remember me flag has been set or not. If it has been it extends the session expiry time.

This is only called if there was a successful login so if you want a hook into that part of the process this is a good place to hook into.

It is also obviously a good place to hook into if you want to change the behaviour of the remember me flag.

CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect
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.