LWP::A...n::Wsse(3pm)

πŸ“¦
version 0.05 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– LWP::A...n::Wsse(3pm) β€” the perl docs page, but make it a group chat πŸ’–

okay bestie so this is the manual for LWP::Authen::Wsse, and honestly? it's short, it's sweet, it's giving ✨niche-but-iconic✨. it lives in the User Contributed Perl Documentation corner of the perl-verse. let's get into it 🫢


✨ NAME ✨

LWP::Authen::Wsse β€” it's the library that lets you turn on X-WSSE authentication in LWP. literally its whole job. πŸ’…


🌸 VERSION 🌸

so this doc describes version 0.05 of LWP::Authen::Wsse, and it was released December 27, 2005. yes bestie, 2005. it's vintage, it's a classic, we respect it. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the vibe, copy-paste-able and everything:

use LWP::UserAgent;
use HTTP::Request::Common;
my $url = 'http://www.example.org/protected_page.html';

# Set up the WSSE client
my $ua = LWP::UserAgent->new;
$ua->credentials('example.org', '', 'username', 'password');

$request = GET $url;
print "--Performing request now...-----------\n";
$response = $ua->request($request);
print "--Done with request-------------------\n";

if ($response->is_success) {
    print "It worked!->", $response->code, "\n";
}
else {
    print "It didn't work!->", $response->code, "\n";
}

like. it prints whether it worked or not. main character diagnostics energy fr fr 🌈


πŸŽ€ DESCRIPTION πŸŽ€

okay so the tea: LWP::Authen::Wsse lets LWP authenticate against servers that are using the X-WSSE authentication scheme β€” which is what the Atom Authentication API requires. that's the whole point of it, no cap.

πŸ’€ important bestie: you do not use this module directly in your code. it's used indirectly through LWP. the LWP system will invoke the WSSE authentication on its own when it bumps into that authentication scheme while it's trying to retrieve a URL from a server. it's backstage crew, not front-of-house. 🧚

you also gotta set the credentials on the UserAgent object, like this:

$ua->credentials('www.company.com:80', '', "username", "password");

notice the :80? yeah. that's the vibe. πŸ“

alternatively β€” and this is the glow-up option β€” you can subclass LWP::UserAgent and override the get_basic_credentials() method. see LWP::UserAgent for more deets, iykyk. πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go read these too, they're the supporting cast and they ate:

  • LWP
  • LWP::UserAgent
  • lwpcook

πŸ‘‘ AUTHORS πŸ‘‘

Audrey Tang <audrey@audrey.org> β€” iconic, we stan. 🌟


Copyright 2004, 2005 by Audrey Tang <audrey@audrey.org>.

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

see <http://www.perl.com/perl/misc/Artistic.html> for the full tea. ✨


and that's the whole page bestie!! no filler, all facts, zero notes skipped πŸ’…

cute sign-off: this lil doc came to you via perl v5.36.0, dated 2022-11-27, and it lives under the name LWP::A...n::Wsse(3pm) in the User Contributed Perl Documentation. go forth and authenticate, you gorgeous little WSSE gremlin πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from