Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CatalystX::Controller::Auth 0.22

    Download button

    No screenshots available
    Downloads: 87  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Rob Brown | More programs
    Perl Artistic License / FREE
    September 21st, 2012, 02:23 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CatalystX::Controller::Auth description

    A config-driven Catalyst authentication controller base class

    CatalystX::Controller::Auth is a config-driven Catalyst authentication controller base class.

    SYNOPSIS

    This is a Catalyst controller for handling registering, logging in/out, forgotten/resetting passwords, and changing passwords.

    This controller was essentially born out of HTML::FormHandlerX::Form::Login (which it uses), though that form does not want to become dependant on Catalyst.

    See CatalystX::SimpleLogin for an alternative approach.

    Ensure you include the Catalyst::Plugin::StatusMessage in MyApp.pm.

     use Catalyst qw/
     ...
     StatusMessage
     ...
     /;


    Extend this base controller class for your own authentication controller, then modify your config as required.

    The configs for action_after_register, action_after_login, and action_after_change_password will all need specifying in your own config since they will be specific to your app.

     package MyApp::Controller::Auth;
     
     use Moose;
     use namespace::autoclean;
     
     BEGIN { extends 'CatalystX::Controller::Auth'; }
     
     __PACKAGE__->meta->make_immutable;
     
     1;


    Configure it as you like ...

     < Controller::Auth >
     
     form_handler HTML::FormHandlerX::Form::Login
     
     view TT
     model DB::User
     
     login_id_field email
     login_id_db_field email
     
     enable_register 1
     enable_sending_register_email 1
     
     register_template auth/register.tt
     login_template auth/login.tt
     change_password_template auth/change-password.tt
     forgot_password_template auth/forgot-password.tt
     reset_password_template auth/reset-password.tt
     
     forgot_password_email_view Email::Template
     forgot_password_email_from "MyApp"
     forgot_password_email_subject Password Reset
     forgot_password_email_template_plain reset-password-plain.tt

     register_email_view Email::Template
     register_email_from "MyApp"
     register_email_subject Registration Success
     register_email_template_plain register-plain.tt
     
     register_successful_message "You are now registered"
     register_exists_failed_message "That username is already registered."
     login_required_message "You need to login."
     already_logged_in_message "You are already logged in."
     login_successful_message "Logged in!"
     logout_successful_message "You have been logged out successfully."
     login_failed_message "Bad username or password."
     password_changed_message "Password changed."
     password_reset_message "Password reset successfully."
     forgot_password_id_unknown "Email address not registered."
     
     token_salt 'tgve546vy6yv%^$fghY56VH54& H54&%$uy^5 Y^53U&$u v5ev'
     
     auto_login_after_register 1
     
     action_after_register /admin/index
     action_after_login /admin/index
     action_after_change_password /admin/index
     
     < /Controller::Auth >


    Override actions as necessary (hopefully not too much, otherwise I have not built this right).

    All feedback and patches are always welcome.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Catalyst authentication | Perl module | authentication controller | Perl | Catalyst | authentication

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM