CGI::A...Display(3pm)
π CGI::Application::Plugin::Authentication::Display(3pm)
okay so bestie, welcome to CGI::Application::Plugin::Authentication::Display β part of the User Contributed Perl Documentation situation. yes, the name is a whole paragraph, we don't make the rules. it's the display half of the auth plugin, and it's here to make your login boxes cute instead of tangled up in your backend. π
β¨ NAME β¨
CGI::Application::Plugin::Authentication::Display β literally just generates the bits of HTML you need for authentication. that's it. that's the job. π
πΈ DESCRIPTION πΈ
the whole point of this code, and I cannot stress this enough, is to keep display code far, far away from the back-end of authentication management. like, separate kingdoms. no cap.
heads up though: this is an abstract base class, so you can't just use it on its own β it has to be used in conjunction with derived classes. and those derived classes? you've got options, bestie:
- the subclass
CGI::Application::Plugin::Authentication::Display::Classicis provided to ensure backwards compatibility with the old code. it has the advantage of working out of the box but still retaining flexibility. lowkey the chill one. β¨ - the subclass
CGI::Application::Plugin::Authentication::Display::Basicis provided to ensure XHTML compliance and to leave styling to CSS style-sheets. very clean, very demure. π¦ - you can handle all the HTML side yourself, in which case this code is not even loaded. main character move honestly. π
- you can use derived classes in templates that have dot support, which keeps the display code close to the templates. this has other advantages too β for example one can use the
enforce_protectionmethod to mark a template as being only viewable after authentication. a number of other methods can be called from the template that provide information about the authentication status. iykyk. π
π METHODS π
β new
the constructor, obviously. it must be passed the CGI::Application object as the first non-object argument. why? because that's what allows derived modules to access the authentication information. give the constructor what it wants and everyone's happy. π«Ά
β login_box
this method will return the HTML for a login box that can be embedded into another page. and it's the same login box that is used in the default authen_login runmode that the plugin provides. consistent queen behavior. π
warning bestie: this function is not implemented in this module. one must use a derived class with an appropriate implementation of this function. don't come crying to the base class, it literally cannot. π
β logout_form
this returns the simple bit of HTML need to have a logout button. (yes, we kept the typo energy, it's giving vintage.) the form has /?authen_logout=1 as the action, but of course this can be changed in derived modules. flexible fr fr. π
β enforce_protection
this method is useful when the class is being used in templates to mark a certain template as for authenticated eyes only. π so in HTML::Template::Plugin::Dot one might have:
<TMPL_VAR NAME="authen.enforce_protection">
and one must set authen to one of these objects via the HTML::Template::param method. if authenticated it will resolve to a simple string, otherwise it will croak. so like... behave. π
β login_title
this returns the TITLE parameter from the LOGIN_FORM section of the config. short, sweet, iconic. π
β is_authenticated
β username
β last_login
β last_access
β is_login_timeout
β login_attempts
these methods all provide access to the cognate methods on the authentication object. they are provided as templates might find them expressive. (translation: your templates will think they ate. π₯)
π BUGS π
this is alpha software and as such, the features and interface are subject to change. so please check the Changes file when upgrading. do not skip the Changes file, bestie, i am begging. π
π¦ SEE ALSO π¦
CGI::Applicationperl(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. generous icons. π
thanks to Christian Walde for suggesting changes to fix the incompatibility with CGI::Application::Plugin::ActionDispatch and for help with github. we love a collaborative moment. π«Ά
πΈ 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 π₯
okay so this part is in ALL CAPS in the original and honestly it deserves the drama, so here it is, full volume:
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.
and that's the whole page, bestie! β¨ this lil doc drop is fromperl v5.38.2, dated2024-06-29β go forth and authenticate responsibly. mwah. π π
π¦ 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