NAME

Scaffold::Uaf::Login - A handler for the /login url.

DESCRIPTION

This handler handles the url "/login" and any actions on that url. By default this method display a simple login page which contains a login form. That form is submitted back to the "/login/validate" url, where the username and password are processed. This processing is done by the uaf_validate() method. If validation is succesful an User object is created. This object is then stored within the session store so uaf_is_valid() can access it when doing authentication. Also an initial security token is created.

This method also implements a simple three tries at login attempts. If after three tries, all attempts are redirected to "/login/denied", which displays a simple "denied" page. After a succesful login, a redirect is sent for root of the application.

METHODS

do_main

Displays a login page based on the following config items:

uaf_login_title
uaf_login_template
uaf_login_wrapper
do_denied

Displays a denied page based on the following config items:

uaf_denied_title
uaf_login_template
uaf_login_wrapper
do_validate

Performs the authentication depending on the username and password parameters. If the authentication is valid, it will create a User object that is stored in $self->scaffold->user and creates a security token that is passed with the session cookies.

DEPENDENICES

Scaffold::Uaf::Authenticate

SEE ALSO

Scaffold
Scaffold::Base
Scaffold::Cache
Scaffold::Cache::FastMmap
Scaffold::Cache::Manager
Scaffold::Cache::Memcached
Scaffold::Class
Scaffold::Constants
Scaffold::Engine
Scaffold::Handler
Scaffold::Handler::Default
Scaffold::Handler::Favicon
Scaffold::Handler::Robots
Scaffold::Handler::Static
Scaffold::Lockmgr
Scaffold::Lockmgr::KeyedMutex
Scaffold::Lockmgr::UnixMutex
Scaffold::Plugins
Scaffold::Render
Scaffold::Render::Default
Scaffold::Render::TT
Scaffold::Routes
Scaffold::Server
Scaffold::Session::Manager
Scaffold::Stash
Scaffold::Stash::Controller
Scaffold::Stash::Cookie
Scaffold::Stash::Manager
Scaffold::Stash::View
Scaffold::Uaf::Authenticate
Scaffold::Uaf::AuthorizeFactory
Scaffold::Uaf::Authorize
Scaffold::Uaf::GrantAllRule
Scaffold::Uaf::Login
Scaffold::Uaf::Logout
Scaffold::Uaf::Manager
Scaffold::Uaf::Rule
Scaffold::Uaf::User
Scaffold::Utils

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2009 Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.