|
NAMECatalystX::SimpleLogin - Provide a simple Login controller which can be reusedSYNOPSISpackage MyApp; use Moose; use namespace::autoclean; use Catalyst qw/ +CatalystX::SimpleLogin Authentication Session Session::State::Cookie Session::Store::File /; extends 'Catalyst'; __PACKAGE__->config( 'Plugin::Authentication' => { # Auth config here } ); __PACKAGE__->config( 'Controller::Login' => { # SimpleLogin config here } ); __PACKAGE__->setup; ATTENTION!If you're new here, you should start by reading CatalystX::SimpleLogin::Manual, which provides a gentler introduction to using this code. Come back here when you're done there.DESCRIPTIONCatalystX::SimpleLogin is an application class Moose::Role which will inject a Catalyst::Controller which is an instance of CatalystX::SimpleLogin::Controller::Login into your application. This provides a simple login and logout page with the addition of only one line of code and one template to your application.REQUIREMENTS
CUSTOMISATIONCatalystX::SimpleLogin is a prototype for CatalystX::Elements. As such, one of the goals is to make it easy for users to customise the provided component to the maximum degree possible, and also, to have a linear relationship between effort invested and level of customisation achieved.Three traits are shipped with SimpleLogin: WithRedirect, Logout, and RenderAsTTTemplate. These traits are set in the config: __PACKAGE__->config( 'Controller::Login' => { traits => [qw/ Logout WithRedirect RenderAsTTTemplate /], login_form_args => { # see the login form }, ); COMPONENTS
TODOHere's a list of what I think needs working on, in no particular order.Please feel free to add to or re-arrange this list :)
SOURCE CODEhttp://github.com/bobtfish/catalystx-simplelogin/tree/master git://github.com/bobtfish/catalystx-simplelogin.git Forks and patches are welcome. #formhandler or #catalyst (irc.perl.org) are both good places to ask about using or developing this code. SEE ALSO
AUTHORS
LICENSECopyright 2009 Tomas Doran. Some rights reserved.This software is free software, and is licensed under the same terms as perl itself.
Visit the GSP FreeBSD Man Page Interface. |