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 πŸ’–


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