Cataly...Simple(3pm)
π Cataly...Simple(3pm) π
okay bestie, this is Catalyst::Authentication::Credential::Authen::Simple β the Perl manpage, the whole thing, but make it cute. it's from the User Contributed Perl Documentation section (section 3pm, we love a 3pm moment) and it's here to Verify credentials with the Authen::Simple framework. no cap. π«Ά
πΈ NAME πΈ
Catalyst::Authentication::Credential::Authen::Simple β verify credentials with the Authen::Simple framework. it's giving "one credential class to rule them all" and honestly? iconic. π
β¨ SYNOPSIS β¨
use Catalyst qw(Authentication);
# later on ...
if ($c->authenticate({ username => 'myusername',
password => 'mypassword' })){
my $long_name = $c->user->get('LongName');
# Hello Mr $long_name
}
see how chill that is?? you authenticate, you get your user, you say hi to Mr $long_name. the whole vibe check passes. π
π¦ DESCRIPTION π¦
this module helps your Catalyst Application authenticate against a lot of credential databases, and it does it thanks to the Authen::Simple framework. like, a lot a lot. so many credential databases. you're welcome. π
π USAGE π
bestie listen, the setup is literally just this: configure your Catalyst App Authentication to use the class 'Authen::Simple' as the credential verifier, and hand it a set of Authen::Simple classes. that's the whole assignment.
you can pass arguments to the Authen::Simple:XXX class constructors with the 'args' key. note that the authen key is an array β yes, an array, not a single thing, don't @ me. π
and here's the tea: if more than one class is specified, when your app authenticates, the username and password get submitted to each class until one of the classes returns that the user/pass pair is valid. it's a little relay race of authentication. πββοΈ and if no class validates the credentials? the user is not able to log in. periodt. that's it. no login for them. π
'Plugin::Authentication' => {
'realms' => {
'default' => {
'store' => { ... }
'credential' => {
'class' => 'Authen::Simple',
'authen' => [
{
'class' => 'Passwd',
'args' => {
'path' => '/etc/shadow'
}
},
{
'class' => 'SSH',
'args' => {
'host' => 'host.company.com'
}
}
]
}
}
}
}
look at that config. structured. organized. main character energy. π
oh and also β if the Catalyst log object is compatible with the Authen::Simple log object, the Authen::Simple classes will log through Catalyst. the logs stay in the family. π«Ά
π new π
Called by Catalyst::Authentication. It instances the Authen::Simple classes read from the configuration. constructor behavior, we love to see it. β¨
π authenticate π
Usage : Call $c->authenticate({ username => ..., password => ...});
Returns : User object if the credentials are verified successfully. undef if user not authenticated.
so: call it, and you either get a User object (slay) or you get undef (not slay). that's the binary. that's the whole story. π₯
π AUTHOR π
Jose Luis Martinez
CPAN ID: JLMARTIN
CAPSiDE
jlmartinez@capside.com
http://www.pplusdomain.net
the legend themselves. respect the author, always. π
πΈ THANKS πΈ
Tobjorn Lindahl, Dylan Martin, Tomas Doran and Inigo Tejedor Arrondo for patches and recommedations. y'all are the real ones, fr fr. π
β COPYRIGHT β
Copyright (c) 2008 by Jose Luis Martinez Torres
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
so yeah β free software, same terms as Perl, and if you want the full legal novel it's chilling in the LICENSE file that ships with this module. πβ¨
π¦ SEE ALSO π¦
Authen::Simpleand all of theAuthen::Simple::XXXclasses β go read them, they're the whole supporting cast. π
and that's the page, bestie!! this one came from perl v5.34.0, dated 2022-06-09, and it lives at Cataly...Simple(3pm). mwah, go authenticate something. πβ¨π
π¦ where this page comes from
- debian bookworm: libcatalyst-authentication-credential-authen-simple-perl 0.09-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-authentication-credential-authen-simple-perl 0.09-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-authentication-credential-authen-simple-perl 0.09-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-authentication-credential-authen-simple-perl 0.09-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-authentication-credential-authen-simple-perl 0.09-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms