Scroll to navigation

CGI::Application::Plugin::Authentication::Display::Classic(3pm) User Contributed Perl Documentation CGI::Application::Plugin::Authentication::Display::Classic(3pm)

NAME

CGI::Application::Plugin::Authentication::Display::Classic - login box that works out of the box

DESCRIPTION

This module provides a login box that works out of the box but which can be configured to modify the styling.

METHODS

new

The constructor must be passed the CGI::Application object as the first non-object argument.

login_box

This method will return the HTML for a login box that can be embedded into another page. This is the same login box that is used in the default authen_login runmode that the plugin provides.

You can set this option to customize the login form that is created when a user needs to be authenticated. If you wish to replace the entire login form with a completely custom version, then just set LOGIN_RUNMODE to point to your custom runmode.

All of the parameters listed below are optional, and a reasonable default will be used if left blank:

the heading at the top of the login box
the label for the user name input
the label for the password input
the label for the submit button
a message provided on the first login attempt
provide a checkbox to offer to remember the users name in a cookie so that their user name will be pre-filled the next time they log in
the label for the remember user name checkbox
the name of the cookie where the user name will be saved
the URL for the register new account link
the label for the register new account link
the URL for the forgot password link
the label for the forgot password link
a message given when a login failed
use this to disable the built in style-sheet for the login box so you can provide your own custom styles
use this to get the form to submit using 'get' instead of 'post'
use this to automatically focus the login form when the page loads so a user can start typing right away.
This is the base colour that will be used in the included login box. All other colours are automatically calculated based on this colour (unless you hardcode the colour values). In order to calculate other colours, you will need the Color::Calc module. If you do not have the Color::Calc module, then you will need to use fixed values for all of the colour options. All colour values besides the BASE_COLOUR can be simple percentage values (including the % sign). For example if you set the LIGHTER_COLOUR option to 80%, then the calculated colour will be 80% lighter than the BASE_COLOUR.
A colour that is lighter than the base colour.
A colour that is another step lighter than the light colour.
A colour that is darker than the base colour.
A colour that is another step darker than the dark colour.
A grey colour that is calculated by desaturating the base colour.

  LOGIN_FORM => {
    TITLE              => 'Login',
    SUBMIT_LABEL       => 'Login',
    REMEMBERUSER_LABEL => 1,
    BASE_COLOUR        => '#0099FF',
    LIGHTER_COLOUR     => '#AAFFFF',
    DARK_COLOUR        => '50%',
  }

BUGS

This is alpha software and as such, the features and interface are subject to change. So please check the Changes file when upgrading.

SEE ALSO

CGI::Application, perl(1)

AUTHOR

Author: Cees Hek <ceeshek@gmail.com>; Co-maintainer: Nicholas Bamber <nicholas@periapt.co.uk>.

CREDITS

Thanks to SiteSuite (http://www.sitesuite.com.au) for funding the development of this plugin and for releasing it to the world.

Thanks to Christian Walde for suggesting changes to fix the incompatibility with CGI::Application::Plugin::ActionDispatch and for help with github.

LICENCE AND COPYRIGHT

Copyright (c) 2005, SiteSuite. All rights reserved. Copyright (c) 2010, Nicholas Bamber. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

2024-01-05 perl v5.36.0