Authen...::HTTP(3pm)
β¨ Authen::Simple::HTTP β¨
okay bestie, gather round π this is Authen::Simple::HTTP, a lil Perl module from the User Contributed Perl Documentation collection, and it's literally just "Simple HTTP authentication" β that's the whole vibe. it's giving tiny, it's giving useful, it's giving let me check your password against some HTTP server real quick. no cap. π«Ά
πΈ SYNOPSIS πΈ
so like, here's how you actually use it:
use Authen::Simple::HTTP;
my $http = Authen::Simple::HTTP->new(
url => 'http://www.host.com/protected'
);
if ( $http->authenticate( $username, $password ) ) {
# successfull authentication
}
# or as a mod_perl Authen handler
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::HTTP
PerlSetVar AuthenSimpleHTTP_url "http://www.host.com/protected"
<Location /protected>
PerlAuthenHandler Authen::Simple::HTTP
AuthType Basic
AuthName "Protected Area"
Require valid-user
</Location>
and yes that # successfull authentication comment is staying exactly like that, typos are canon here π
(not me preserving the spelling, but fr fr we do not touch the code blocks. ever.)
π¦ DESCRIPTION π¦
Authenticate against an HTTP server. that's it. that's the whole thing. you point it at a server, it checks if the username + password combo slaps or not. iconic behaviour honestly β¨
π METHODS π
π
new
This method takes a hash of parameters. The following options are valid:
urlβ Url to authenticate against. Required. like, you literally cannot skip this one bestie, it's the whole point. π¨
url => 'http://www.host.com/protected'
agentβ Any object that is a subclass ofLWP::UserAgent.
agent => LWP::UserAgent->new;
logβ Any object that supportsdebug,info,errorandwarn.
log => Log::Log4perl->get_logger('Authen::Simple::HTTP')
π authenticate( $username, $password )
Returns true on success and false on failure. that's it. boolean queen. β β
π SEE ALSO π
Authen::Simple.LWP::UserAgent.LWPx::ParanoidAgent.
go read those too, iykyk πβ¨
π AUTHOR π
Christian Hansen ch@ngmedia.com β ty for your service king π«‘
π COPYRIGHT π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. free as in freedom, slay πΈ
and that's the whole page bestie!! this doc came from perl v5.34.0, dated 2022-06-08, so if you're reading this in the future just know it was giving 2022 energy πβ¨ mwah, go authenticate something responsibly ππ
π¦ where this page comes from
- debian bookworm: libauthen-simple-http-perl 0.2-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libauthen-simple-http-perl 0.2-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libauthen-simple-http-perl 0.2-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libauthen-simple-http-perl 0.2-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libauthen-simple-http-perl 0.2-6 Β· 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