CGI::A...lassic(3pm)
π CGI::Application::Plugin::Authentication::Display::Classic(3pm)
okay so bestie, listen β this is the CGI::Application::Plugin::Authentication::Display::Classic page from the Perl manual, section 3pm, and it's genuinely one of the nicer ones because it's about a login box that just works. iykyk π
β¨ NAME β¨
CGI::Application::Plugin::Authentication::Display::Classic β the login box that works out of the box π
π¦ DESCRIPTION π¦
So this module hands you a login box that works right out of the box, no cap β but the whole thing is configurable so you can mess with the styling however you want. it's giving "sensible defaults, main character energy" π
πΈ METHODS πΈ
β new
The constructor must be passed the CGI::Application object as the first non-object argument. that's the vibe check it needs to pass fr fr.
π login_box
This method returns the HTML for a login box that you can embed into another page. and like β it's the same login box that gets used in the default authen_login runmode that the plugin provides. iconic π
You can set this option to customize the login form that's created when a user needs to be authenticated. And if you want to replace the entire login form with a completely custom version? easy β just set LOGIN_RUNMODE to point to your custom runmode. periodt β¨
All of the parameters listed below are optional, and a reasonable default gets used if you leave them blank:
TITLE(default:Sign In) β the heading at the top of the login box πUSERNAME_LABEL(default:User Name) β the label for the user name inputPASSWORD_LABEL(default:Password) β the label for the password input πSUBMIT_LABEL(default:Sign In) β the label for the submit buttonCOMMENT(default:Please enter your username and password in the fields below.) β a message provided on the first login attemptREMEMBERUSER_OPTION(default:1) β provides a checkbox offering to remember the user's name in a cookie, so their user name gets pre-filled the next time they log in πREMEMBERUSER_LABEL(default:Remember User Name) β the label for the remember user name checkboxREMEMBERUSER_COOKIENAME(default:CAPAUTHTOKEN) β the name of the cookie where the user name gets savedREGISTER_URL(default:<none>) β the URL for the register new account linkREGISTER_LABEL(default:Register Now!) β the label for the register new account linkFORGOTPASSWORD_URL(default:<none>) β the URL for the forgot password linkFORGOTPASSWORD_LABEL(default:Forgot Password?) β the label for the forgot password link π«ΆINVALIDPASSWORD_MESSAGE(default:Invalid username or password<br />(login attempt %d)) β a message given when a login failed πINCLUDE_STYLESHEET(default:1) β use this to disable the built in style-sheet for the login box so you can provide your own custom stylesFORM_SUBMIT_METHOD(default:post) β use this to get the form to submit usinggetinstead ofpostFOCUS_FORM_ONLOAD(default:1) β use this to automatically focus the login form when the page loads so a user can start typing right away β¨οΈBASE_COLOUR(default:#445588) β 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 theColor::Calcmodule. If you do not have theColor::Calcmodule, then you will need to use fixed values for all of the colour options. All colour values besides theBASE_COLOURcan be simple percentage values (including the%sign). For example if you set theLIGHTER_COLOURoption to80%, then the calculated colour will be 80% lighter than theBASE_COLOUR. π¨LIGHT_COLOUR(default:50%or#a2aac4) β A colour that is lighter than the base colour.LIGHTER_COLOUR(default:75%or#d0d5e1) β A colour that is another step lighter than the light colour.DARK_COLOUR(default:30%or#303c5f) β A colour that is darker than the base colour.DARKER_COLOUR(default:60%or#1b2236) β A colour that is another step darker than the dark colour.GREY_COLOUR(default:#565656) β A grey colour that is calculated by desaturating the base colour.
and here's the whole thing in action, bestie β look at this config:
LOGIN_FORM => {
TITLE => 'Login',
SUBMIT_LABEL => 'Login',
REMEMBERUSER_LABEL => 1,
BASE_COLOUR => '#0099FF',
LIGHTER_COLOUR => '#AAFFFF',
DARK_COLOUR => '50%',
}
ate. no notes. πβ¨
π BUGS π
This is alpha software, and as such, the features and interface are subject to change. So please check the Changes file when upgrading. seriously bestie, read the Changes file π
π₯ 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.
anyway that's the whole page, hope it ate π
this one's from perl v5.38.2, dated 2024-06-29 β go off, vintage king πβ¨
π¦ where this page comes from
- debian trixie: libcgi-application-plugin-authentication-perl 0.25+~cs0.5-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcgi-application-plugin-authentication-perl 0.25+~cs0.5-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcgi-application-plugin-authentication-perl 0.25+~cs0.5-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms