OAuth:...mMethod(3pm)
π OAuth::Lite2::ParamMethod π
User Contributed Perl Documentation Β· the blueprint era of OAuth 2.0 param handling β¨
πΈ NAME πΈ
OAuth::Lite2::ParamMethod β bestie, it's the base class of builder/parser for OAuth 2.0 parameters. That's the whole vibe. Every other param method out here is lowkey just standing on this one's shoulders. π
π SYNOPSIS π
Okay so here's how you actually use it, fr fr:
my $meth = OAuth::Lite2::ParamMethod::Foo->new;
# server side
if ($meth->match( $plack_request )) {
my ($token, $params) = $meth->parse( $plack_request );
}
# client side
my $http_req = $meth->request_builder(...);
Two whole moods in one snippet: server side goes match β parse, client side goes request_builder. Slay. π
π¦ DESCRIPTION π¦
It's the base class of builder/parser for OAuth 2.0 parameters. Not the main character itself, but the template every main character inherits from. β¨
π METHODS π
β new
Constructor. That's it, that's the whole description. Make a new one, move on. π«Ά
π match( $plack_request )
Returns true if the Plack::Request object you passed in is matched for the type of this method. Vibe check, but for requests. π
if ( $meth->match( $plack_request ) ) {
...
}
π parse( $plack_request )
Parse the Plack::Request, and returns access token and oauth parameters. Two things come back out, no cap. π
my ($token, $params) = $meth->parse( $plack_request );
π§ build_request( %params )
Build an HTTP::Request object. The full build, with all the keys it takes:
my $req = $meth->build_request(
url => $url,
method => $http_method,
token => $access_token,
oauth_params => $oauth_params,
params => $params,
content => $content,
headers => $headers,
);
Seven keys, all named, all accounted for. Obsessed. β¨
π₯ SEE ALSO π₯
The whole little family, go read them too:
OAuth::Lite2::ParamMethodsOAuth::Lite2::ParamMethod::AuthHeaderOAuth::Lite2::ParamMethod::FormEncodedBodyOAuth::Lite2::ParamMethod::URIQueryParameter
π AUTHOR π
Lyo Kato, <lyo.kato@gmail.com> π
πΈ COPYRIGHT AND LICENSE πΈ
Copyright (C) 2010 by Lyo Kato
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
Legal bestie moment: free software, same terms as Perl itself, either Perl version 5.8.8 or (your choice!) any later version of Perl 5 you happen to have. Pick your fighter. π
And that's the page, bestie β this doc dropped as part of perl v5.36.0, dated 2023-07-01, living in the User Contributed Perl Documentation. Go forth and parse some params. π¦β¨
π¦ where this page comes from
- debian trixie: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liboauth-lite2-perl 0.11-3 Β· 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