CGI::A...::CDBI(3pm)

πŸ“¦
version 0.25+~cs0.5 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– CGI::A...::CDBI(3pm) β€” the whole vibe πŸ’–

okay bestie, so this page lives in the User Contributed Perl Documentation section of the manual, and it's called CGI::A...::CDBI(3pm), which is the shorthand for CGI::Application::Plugin::Authentication::Driver::CDBI. Say that three times fast, I dare you. 🫢


✨ NAME ✨

THIS MODULE IS UNSUPPORTED! YOU CAN ADOPT IT IF YOU LIKE IT! WRITE TO modules@perl.org IF YOU WANT TO MAINTAIN IT.

no literally, that's the actual NAME section. it's giving "free to a good home" energy and honestly? iconic. πŸ’€

CGI::Application::Plugin::Authentication::Driver::CDBI β€” the Class::DBI Authentication Driver. she does auth, but through Class::DBI. periodt.


🌸 VERSION 🌸

Version 0.03

THIS MODULE IS UNSUPPORTED! YOU CAN ADOPT IT IF YOU LIKE IT! WRITE TO modules@perl.org IF YOU WANT TO MAINTAIN IT.

yes bestie, they said it twice. it's a whole mood. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole setup, verbatim, no cap:

use base qw(CGI::Application);
use CGI::Application::Plugin::Authentication;

__PACKAGE__->authen->config(
  DRIVER => [ 'CDBI',
    CLASS   => 'My::CDBI::Users',
    FIELD_METHODS => [qw(user MD5:passphrase)]
  ],
  CREDENTIALS => [qw(auth_username auth_password)],
);

like… look at her. DRIVER is CDBI, CLASS is your class, FIELD_METHODS maps your fields, CREDENTIALS is what comes in. chef's kiss. 😌✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: this Authentication driver uses the Class::DBI module to let you authenticate against any Class::DBI class. any of them. your class, your friend's class, the class of your dreams. lowkey magical. πŸ”₯


🌈 PARAMETERS 🌈

the Class::DBI authentication driver accepts the following required parameters. (yes, required. no skipping. main character rules. πŸ‘‘)

⭐ CLASS (required) ⭐

Specifies the Class::DBI class to use for authentication. And heads up bestie β€” this class must be loaded prior to use. no lazy-loading shenanigans, load her up first. 🫑

⭐ FIELD_METHODS (required) ⭐

FIELD_METHODS is an arrayref of the methods in the Class::DBI class specified by CLASS to be used during authentication. And the order of these methods needs to match the order of the CREDENTIALS. it's a matching game, and you cannot mismatch, fr fr. 😭

For example, if CREDENTIALS is set to:

CREDENTIALS => [qw(auth_user auth_domain auth_password)]

Then FIELD_METHODS must be set to:

FIELD_METHODS => [qw(userid domain password)]

see how they line up? auth_user ↔ userid, auth_domain ↔ domain, auth_password ↔ password. slay. πŸ’…

FIELD_METHODS supports filters as specified by CGI::Application::Plugin::Authentication::Driver. (go read that one, iykyk. πŸ’œ)


πŸ’… METHODS πŸ’…

🧚 verify_credentials 🧚

This method will test the provided credentials against the values found in the database, according to the Driver configuration. that's it. that's the method. she verifies, she slays, she goes home. 🌟


πŸ‘€ SEE ALSO πŸ‘€

  • CGI::Application::Plugin::Authentication::Driver
  • CGI::Application::Plugin::Authentication
  • perl(1)

the whole friend group. go say hi. 🫢


πŸ’œ AUTHOR πŸ’œ

Shawn Sorichetti, "<ssoriche@coloredblocks.net>" β€” thank you for your service king 🫑✨


πŸ› BUGS πŸ›

Please report any bugs or feature requests to "bug-cgi-application-plugin-authentication-driver-cdbi@rt.cpan.org", or through the web interface at:

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-Authentication-Driver-CDBI>

the deal is: I (the author) will be notified, and then you'll automatically be notified of progress on your bug as I make changes. so it's a two-way thing, very reciprocal, very healthy communication. we love to see it. πŸ’–


🌸 ACKNOWLEDGEMENTS 🌸

Special thanks to Cees Hek for writing CGI::Application::Plugin::Authentication and his assistance in writing this module. giving credit where credit is due, as one always should. πŸ‘‘πŸ’


THIS MODULE IS UNSUPPORTED! YOU CAN ADOPT IT IF YOU LIKE IT! WRITE TO modules@perl.org IF YOU WANT TO MAINTAIN IT.

(third time's the charm, bestie. they really want you to know. πŸ™ˆ)

Copyright 2005 Shawn Sorichetti, all rights reserved.

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


and that's the whole page, babes! 🌈 this was CGI::A...::CDBI(3pm) from perl v5.38.2, dated 2024-06-29 β€” shoutout to the Perl docs for keeping her alive. now go authenticate something and be the main character of your own database. bye bestie! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from