.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "CatalystX::SimpleLogin 3pm" .TH CatalystX::SimpleLogin 3pm "2017-08-26" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" CatalystX::SimpleLogin \- Provide a simple Login controller which can be reused .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& package MyApp; \& use Moose; \& use namespace::autoclean; \& \& use Catalyst qw/ \& +CatalystX::SimpleLogin \& Authentication \& Session \& Session::State::Cookie \& Session::Store::File \& /; \& extends \*(AqCatalyst\*(Aq; \& \& _\|_PACKAGE_\|_\->config( \& \*(AqPlugin::Authentication\*(Aq => { # Auth config here } \& ); \& \& _\|_PACKAGE_\|_\->config( \& \*(AqController::Login\*(Aq => { # SimpleLogin config here } \& ); \& \& _\|_PACKAGE_\|_\->setup; .Ve .SH "ATTENTION!" .IX Header "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. .SH "DESCRIPTION" .IX Header "DESCRIPTION" CatalystX::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. .SH "REQUIREMENTS" .IX Header "REQUIREMENTS" .IP "A Catalyst application" 4 .IX Item "A Catalyst application" .PD 0 .IP "Working authentication configuration" 4 .IX Item "Working authentication configuration" .IP "Working session configuration" 4 .IX Item "Working session configuration" .IP "A view" 4 .IX Item "A view" .PD .SH "CUSTOMISATION" .IX Header "CUSTOMISATION" CatalystX::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. .PP Three traits are shipped with SimpleLogin: WithRedirect, Logout, and RenderAsTTTemplate. These traits are set in the config: .PP .Vb 5 \& _\|_PACKAGE_\|_\->config( \& \*(AqController::Login\*(Aq => { \& traits => [qw/ Logout WithRedirect RenderAsTTTemplate /], \& login_form_args => { # see the login form }, \& ); .Ve .SH "COMPONENTS" .IX Header "COMPONENTS" .IP "\(bu" 4 CatalystX::SimpleLogin::Controller::Login \- first point of call for customisation. Override the action configs to reconfigure the paths of the login or logout actions. Subclass to be able to apply method modifiers to run before / after the login or logout actions or override methods. .IP "\(bu" 4 CatalystX::SimpleLogin::TraitFor::Controller::Login::Logout \- provides the \f(CW\*(C`logout\*(C'\fR action and associated methods. You can compose this manually yourself if you want just that action. .Sp This trait is set by default, but if you set another trait in your config, you will have to include it. .IP "\(bu" 4 CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect \- provides the \f(CW\*(C`login\*(C'\fR 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 .IP "\(bu" 4 CatalystX::SimpleLogin::TraitFor::Controller::Login::RenderAsTTTemplate \- sets the stash variable 'template' to point to a string reference containing the rendered template so that it's not necessary to have a login.tt template file. .IP "\(bu" 4 CatalystX::SimpleLogin::Form::Login \- the HTML::FormHandler form for the login form. .IP "\(bu" 4 Catalyst::ActionRole::NeedsLogin \- Used to cause a specific path to redirect to the login page if a user is not authenticated. .SH "TODO" .IX Header "TODO" Here's a list of what I think needs working on, in no particular order. .PP Please feel free to add to or re-arrange this list :) .IP "Fix extension documentation" 4 .IX Item "Fix extension documentation" .PD 0 .IP "Document all this stuff." 4 .IX Item "Document all this stuff." .IP "Examples of use / customisation in documentation" 4 .IX Item "Examples of use / customisation in documentation" .IP "Fixing one uninitialized value warning in LoginRedirect" 4 .IX Item "Fixing one uninitialized value warning in LoginRedirect" .IP "Disable the use of NeedsLogin ActionRole when WithRedirect is not loaded" 4 .IX Item "Disable the use of NeedsLogin ActionRole when WithRedirect is not loaded" .PD .SH "SOURCE CODE" .IX Header "SOURCE CODE" .Vb 1 \& http://github.com/bobtfish/catalystx\-simplelogin/tree/master \& \& git://github.com/bobtfish/catalystx\-simplelogin.git .Ve .PP Forks and patches are welcome. #formhandler or #catalyst (irc.perl.org) are both good places to ask about using or developing this code. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 Catalyst .IP "\(bu" 4 Moose and Moose::Role .IP "\(bu" 4 MooseX::MethodAttributes::Role \- Actions composed from Moose::Role. .IP "\(bu" 4 CatalystX::InjectComponent \- Injects the controller class .IP "\(bu" 4 HTML::FormHandler \- Generates the login form .IP "\(bu" 4 Catalyst::Plugin::Authentication \- Responsible for the actual heavy lifting of authenticating the user .IP "\(bu" 4 Catalyst::Plugin::Session .IP "\(bu" 4 Catalyst::Controller \- Allows you to decorate actions with roles (E.g Catalyst::ActionRole::NeedsLogin) .IP "\(bu" 4 CatalystX::Component::Traits \- Allows Moose::Role to be composed onto components from config .SH "AUTHORS" .IX Header "AUTHORS" .ie n .IP "Tomas Doran (t0m) ""bobtfish@bobtfish.net""" 4 .el .IP "Tomas Doran (t0m) \f(CWbobtfish@bobtfish.net\fR" 4 .IX Item "Tomas Doran (t0m) bobtfish@bobtfish.net" .PD 0 .IP "Zbigniew Lukasiak" 4 .IX Item "Zbigniew Lukasiak" .ie n .IP "Stephan Jauernick (stephan48) ""stephan@stejau.de""" 4 .el .IP "Stephan Jauernick (stephan48) \f(CWstephan@stejau.de\fR" 4 .IX Item "Stephan Jauernick (stephan48) stephan@stejau.de" .ie n .IP "Gerda Shank (gshank) ""gshank@cpan.org""" 4 .el .IP "Gerda Shank (gshank) \f(CWgshank@cpan.org\fR" 4 .IX Item "Gerda Shank (gshank) gshank@cpan.org" .ie n .IP "Florian Ragwitz ""rafl@debian.org""" 4 .el .IP "Florian Ragwitz \f(CWrafl@debian.org\fR" 4 .IX Item "Florian Ragwitz rafl@debian.org" .IP "Shlomi Fish" 4 .IX Item "Shlomi Fish" .ie n .IP "Oleg Kostyuk (cub-uanic) ""cub@cpan.org""" 4 .el .IP "Oleg Kostyuk (cub-uanic) \f(CWcub@cpan.org\fR" 4 .IX Item "Oleg Kostyuk (cub-uanic) cub@cpan.org" .PD .SH "LICENSE" .IX Header "LICENSE" Copyright 2009 Tomas Doran. Some rights reserved. .PP This software is free software, and is licensed under the same terms as perl itself.