2. CatalystX::SimpleLogin
• I’ve written quite a few web applications :)
• I try and cheat as often as possible and use
basic auth over SSL.
• I’ve still written the /login page dozens of
times
• I HATE WRITING THAT. AGAIN. AND
AGAIN. AND AGAIN.
3. CatalystX::SimpleLogin
• Build a highly configurable login page? As a
set of pluggable Moose roles...
• Lets call it Simple...
• What could possibly go wrong?
4. Things that went wrong
• Moose
• MooseX::MethodAttributes
• Catalyst
• CatalystX::Component::Traits
• MooseX::Traits::Pluggable
• I.E. EVERYTHING.
5. I nearly gave up.
• Caelum - implemented all my wish list features in
the pluggable role stuff, for me. Without saying
patches welcome once!
• gshank - added formhandler, documented it, wrote
a tutorial!!
• rafl - shipped it
• zby - added openid support
6. THOSE PEOPLE ARE
AWESOME
• I guess they’re sick of writing login forms
too, huh?
7. Ok, so what does it do?
• Add 1 line to your app
• You have a login form and logout action.
• Default templates / renderer, or template
yourself
• sub foo : Local Does(‘NeedsLogin’) {
• Redirects back to original uri post login
• OpenID support
8. Why is this awesome?
• Saves time for the simple case
• Customiseable for other cases
• Turn features on or off by applying /
removing roles, with config
• Change uris with config
• Fits into the level of template customisation
you want
• You can use the pieces yourself manually
9. How is this different?
• No scaffold. Change your mind in a snap,
don’t lose customisation.
• Add roles to customise it yourself.
• Throw it away, gradually.
• Components RULE!