HTTP::...zation(3pm)
β¨ HTTP::Headers::ActionPack::Authorization β the Authorization Header factory β¨
okay bestie, so this is a page from the User Contributed Perl Documentation and it's literally the manual for HTTP::Headers::ActionPack::Authorization, the Authorization Header factory. come learn with me π
πΈ VERSION πΈ
version 0.09 β yeah she's on 0.09, we stan a stable release π
π¦ SYNOPSIS π¦
okay so this is the whole vibe of how you use it. every line is exact, no touchy:
use HTTP::Headers::ActionPack::Authorization;
# create HTTP::Headers::ActionPack::Authorization::Basic objects ...
# create from string
my $auth = HTTP::Headers::ActionPack::Authorization->new_from_string(
'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
);
# create from parameters
my $auth = HTTP::Headers::ActionPack::Authorization->new(
'Basic' => {
username => 'Aladdin',
password => 'open sesame'
}
);
my $auth = HTTP::Headers::ActionPack::Authorization->new(
'Basic' => [ 'Aladdin', 'open sesame' ]
);
my $auth = HTTP::Headers::ActionPack::Authorization->new(
'Basic' => 'QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
);
# or HTTP::Headers::ActionPack::Authorization::Digest objects ...
# create from string
my $auth = HTTP::Headers::ActionPack::Authorization->new_from_string(
q{Digest
username="jon.dough@mobile.biz",
realm="RoamingUsers@mobile.biz",
nonce="CjPk9mRqNuT25eRkajM09uTl9nM09uTl9nMz5OX25PZz==",
uri="sip:home.mobile.biz",
qop=auth-int,
nc=00000001,
cnonce="0a4f113b",
response="6629fae49393a05397450978507c4ef1",
opaque="5ccc069c403ebaf9f0171e9517f40e41"}
);
# create from parameters
my $auth = HTTP::Headers::ActionPack::Authorization->new(
'Digest' => (
username => 'jon.dough@mobile.biz',
realm => 'RoamingUsers@mobile.biz',
nonce => "CjPk9mRqNuT25eRkajM09uTl9nM09uTl9nMz5OX25PZz==",
uri => "sip:home.mobile.biz",
qop => 'auth-int',
nc => '00000001',
cnonce => "0a4f113b",
response => "6629fae49393a05397450978507c4ef1",
opaque => "5ccc069c403ebaf9f0171e9517f40e41"
)
);
like... four different ways to make a Basic one and two ways to make a Digest one. the range. the versatility. π
π DESCRIPTION π
so basically this is a factory class, which is just fancy talk for "the class that builds the right thing for you so you don't have to". you hand it an Authorization header, and it goes and creates the appropriate subclass based on the type of that Authorization header. it's giving matchmaker energy fr fr π«Ά
π METHODS π
new ( %params )β the constructor, she takes a hash of params and builds you the right auth object πnew_from_string ( $header_string )β hand her the raw header string and she'll do the parsing and figure out what kind of object you need β¨
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com> β the icon, the moment, the main character π«‘
πΈ CONTRIBUTORS πΈ
these legends pulled up and helped:
- Andrew Nelson
<anelson@cpan.org> - Dave Rolsky
<autarch@urth.org> - Florian Ragwitz
<rafl@debian.org> - Jesse Luehrs
<doy@tozt.net> - Karen Etheridge
<ether@cpan.org>
not a single one of them missing, we list every name, no cap π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go off, remix it, ship it, just keep the same terms as Perl 5 itself bestie π¦
ok and that's the whole page!! every option, every name, every email, every license line β all present and accounted for, we don't skip parts here π
kisses, and happy hacking!! πβ¨ππ¦πΈ
β this has been the page for HTTP::...zation(3pm), generated with perl v5.34.0 on 2022-06-14. love her, follow her, she's iconic. periodt. π
π¦ where this page comes from
- debian bookworm: libhttp-headers-actionpack-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhttp-headers-actionpack-perl 0.09-2 Β· 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