1CatalystX::SimpleLogin(U3s)er Contributed Perl DocumentatCiaotnalystX::SimpleLogin(3)
2
3
4

NAME

6       CatalystX::SimpleLogin - Provide a simple Login controller which can be
7       reused
8

SYNOPSIS

10           package MyApp;
11           use Moose;
12           use namespace::autoclean;
13
14           use Catalyst qw/
15               +CatalystX::SimpleLogin
16               Authentication
17               Session
18               Session::State::Cookie
19               Session::Store::File
20           /;
21           extends 'Catalyst';
22
23           __PACKAGE__->config(
24               'Plugin::Authentication' => { # Auth config here }
25           );
26
27          __PACKAGE__->config(
28               'Controller::Login' => { # SimpleLogin config here }
29          );
30
31          __PACKAGE__->setup;
32

ATTENTION!

34       If you're new here, you should start by reading
35       CatalystX::SimpleLogin::Manual, which provides a gentler introduction
36       to using this code. Come back here when you're done there.
37

DESCRIPTION

39       CatalystX::SimpleLogin is an application class Moose::Role which will
40       inject a Catalyst::Controller which is an instance of
41       CatalystX::SimpleLogin::Controller::Login into your application. This
42       provides a simple login and logout page with the addition of only one
43       line of code and one template to your application.
44

REQUIREMENTS

46       A Catalyst application
47       Working authentication configuration
48       Working session configuration
49       A view
50

CUSTOMISATION

52       CatalystX::SimpleLogin is a prototype for CatalystX::Elements. As such,
53       one of the goals is to make it easy for users to customise the provided
54       component to the maximum degree possible, and also, to have a linear
55       relationship between effort invested and level of customisation
56       achieved.
57
58       Three traits are shipped with SimpleLogin: WithRedirect, Logout, and
59       RenderAsTTTemplate.  These traits are set in the config:
60
61          __PACKAGE__->config(
62               'Controller::Login' => {
63                   traits => [qw/ Logout WithRedirect RenderAsTTTemplate /],
64                   login_form_args => { # see the login form },
65          );
66

COMPONENTS

68       ·   CatalystX::SimpleLogin::Controller::Login - first point of call for
69           customisation.  Override the action configs to reconfigure the
70           paths of the login or logout actions.  Subclass to be able to apply
71           method modifiers to run before / after the login or logout actions
72           or override methods.
73
74       ·   CatalystX::SimpleLogin::TraitFor::Controller::Login::Logout -
75           provides the "logout" action and associated methods. You can
76           compose this manually yourself if you want just that action.
77
78           This trait is set by default, but if you set another trait in your
79           config, you will have to include it.
80
81       ·   CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect -
82           provides the "login" action with a wrapper to redirect to a page
83           which needs authentication, from which the user was previously
84           redirected. Goes hand in hand with Catalyst::ActionRole::NeedsLogin
85
86       ·   CatalystX::SimpleLogin::TraitFor::Controller::Login::RenderAsTTTemplate
87           - sets the stash variable 'template' to point to a string reference
88           containing the rendered template so that it's not necessary to have
89           a login.tt template file.
90
91       ·   CatalystX::SimpleLogin::Form::Login - the HTML::FormHandler form
92           for the login form.
93
94       ·   Catalyst::ActionRole::NeedsLogin - Used to cause a specific path to
95           redirect to the login page if a user is not authenticated.
96

TODO

98       Here's a list of what I think needs working on, in no particular order.
99
100       Please feel free to add to or re-arrange this list :)
101
102       Fix extension documentation
103       Document all this stuff.
104       Examples of use / customisation in documentation
105       Fixing one uninitialized value warning in LoginRedirect
106       Disable the use of NeedsLogin ActionRole when WithRedirect is not
107       loaded
108

SOURCE CODE

110           http://github.com/bobtfish/catalystx-simplelogin/tree/master
111
112           git://github.com/bobtfish/catalystx-simplelogin.git
113
114       Forks and patches are welcome. #formhandler or #catalyst (irc.perl.org)
115       are both good places to ask about using or developing this code.
116

SEE ALSO

118       ·   Catalyst
119
120       ·   Moose and Moose::Role
121
122       ·   MooseX::MethodAttributes::Role - Actions composed from Moose::Role.
123
124       ·   CatalystX::InjectComponent - Injects the controller class
125
126       ·   HTML::FormHandler - Generates the login form
127
128       ·   Catalyst::Plugin::Authentication - Responsible for the actual heavy
129           lifting of authenticating the user
130
131       ·   Catalyst::Plugin::Session
132
133       ·   Catalyst::Controller - Allows you to decorate actions with roles
134           (E.g Catalyst::ActionRole::NeedsLogin)
135
136       ·   CatalystX::Component::Traits - Allows Moose::Role to be composed
137           onto components from config
138

AUTHORS

140       Tomas Doran (t0m) "bobtfish@bobtfish.net"
141       Zbigniew Lukasiak
142       Stephan Jauernick (stephan48) "stephan@stejau.de"
143       Gerda Shank (gshank) "gshank@cpan.org"
144       Florian Ragwitz "rafl@debian.org"
145       Shlomi Fish
146       Oleg Kostyuk (cub-uanic) "cub@cpan.org"
147

LICENSE

149       Copyright 2009 Tomas Doran. Some rights reserved.
150
151       This software is free software, and is licensed under the same terms as
152       perl itself.
153
154
155
156perl v5.28.1                      2017-06-14         CatalystX::SimpleLogin(3)
Impressum