Net::O...:Client(3pm)
π Net::OAuth2::Client β the deprecated bestie π
okay so this is a page from the User Contributed Perl Documentation section of the manual, and the star of the show is Net::OAuth2::Client, a client for OAuth2 access with a deprecated interface. yes bestie, deprecated. it's giving "still here, still slaying, but please move on" π
β¨ NAME β¨
Net::OAuth2::Client β client for OAuth2 access, deprecated interface.
no cap, the word "deprecated" is literally in the NAME section. they were not subtle about it. π«Ά
πΈ SYNOPSIS πΈ
# This module provides the deprecated interface
my $client = Net::OAuth2::Client->new(
$client_id,
$client_secret,
site => $site
);
my $auth = $client->web_server(
redirect_path => "$site/auth/facebook/callback"
);
# interface since v0.50
my $client = Net::OAuth2::Profile::WebServer->new(
client_id => $client_id,
client_secret => $client_secret,
site => $site
redirect_uri => "$site/auth/facebook/callback"
);
so like, first block is the old β¨vibeβ¨, second block is the interface since v0.50. glow-up fr fr. note that the old one passes redirect_path and the new one passes redirect_uri β do not mix those up, they are not the same key and the code is verbatim, so copy it exactly, iykyk π
π¦ DESCRIPTION π¦
This module is kept to translate the expired interface into the new interface.
that's it. that's the whole description. it's a translator, a little bridge between your old code and the new hotness. iconic behavior honestly. π
π METHODS π
π Constructors π
Net::OAuth2::Client->new($id, $secret, %options)β this object collects all%optionsto be used whenweb_server()creates a profile. and listen: the$idgets translated into OPTION"client_id", and$secretgets translated into"client_secret". so you hand it the short names and it quietly does the paperwork for you. queen of admin. π
π§ Accessors π§
$obj->id()β the id accessor.$obj->secret()β the secret accessor.$obj->user_agent()β the user agent accessor.
three little getters, living their best lives, no drama. β¨
π Actions π
$obj->password(%options)β creates aNet::OAuth2::Profile::Passwordobject, based on all the options you passed withnew(), overruled/extended by the%optionsyou pass right here. so: new() sets the base vibe, this call layers on top of it. π₯$obj->web_server(%options)β creates aNet::OAuth2::Profile::WebServerobject, based on all the options you passed withnew(), overruled/extended by the%optionsyou pass right here. same energy, different profile. π«Ά
reminder bestie: the%optionsyou pass into the action method overrule and extend what you gavenew(). it doesn't replace it wholesale, it stacks. that's the whole mechanic, don't skip it.
π COPYRIGHTS π
Copyrights 2013-2019 on the perl code and the related documentation by [Mark Overmeer <markov@cpan.org>] for SURFnet bv, The Netherlands. For other contributors see "Changes".
Copyrights 2011-2012 by Keith Grennan.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
shoutout to the legends who wrote this: Mark Overmeer for SURFnet bv (2013-2019) and Keith Grennan (2011-2012). absolute icons, we love a documented lineage. π
and that's the whole page, bestie π this was perl v5.32.1, dated 2021-10-15, from the Net::O...:Client(3pm) page β now go migrate your interface, she's deprecated for a reason πβ¨π¦
π¦ where this page comes from
- debian bookworm: libnet-oauth2-perl 0.67-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-oauth2-perl 0.67-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libnet-oauth2-perl 0.67-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-oauth2-perl 0.67-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-oauth2-perl 0.67-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-oauth2-perl 0.67-1 Β· 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