OAuth:...edBody(3pm)
π NAME π
okay so bestie, gather round: this is OAuth::Lite2::ParamMethod::FormEncodedBody β it's the builder/parser for the OAuth 2.0 FormEncodedBody type of parameter. that's the whole vibe. it builds them, it parses them, it's giving β¨middleware for form bodiesβ¨.
it lives in the User Contributed Perl Documentation section of the manual, if you were wondering where to find it π«Ά
πΈ SYNOPSIS πΈ
my $meth = OAuth::Lite2::ParamMethod::FormEncodedBody->new;
# server side
if ($meth->match( $plack_request )) {
my ($token, $params) = $meth->parse( $plack_request );
}
# client side
my $http_req = $meth->request_builder(...);
π¦ DESCRIPTION π¦
literally what it says on the tin, no cap: it's a builder/parser for OAuth 2.0 FormEncodedBody type of parameter. build them on the client side, parse them on the server side, and let this little icon do the heavy lifting π
π METHODS π
β¨ new
Constructor. that's it, that's the method. spawns you a fresh object π
β¨ match( $plack_request )
returns true if the Plack::Request object you handed it is matched for the type of this method. vibe check: passed β
if ( $meth->match( $plack_request ) ) {
...
}
β¨ parse( $plack_request )
parses the Plack::Request, and returns the access token and the oauth parameters. two things back, in that order, bestie β don't mix them up π
my ($token, $params) = $meth->parse( $plack_request );
β¨ build_request( %params )
builds an HTTP::Request object for you. so considerate of it π«Ά
my $req = $meth->build_request(
url => $url,
method => $http_method,
token => $access_token,
oauth_params => $oauth_params,
params => $params,
content => $content,
headers => $headers,
);
β¨ is_legacy( $plack_request )
returns true if the passed Plack::Request object is based on draft version 10. yes, draft version 10. we do NOT talk about draft version 10, but we do support it, because we're nice like that π
if ( $meth->is_legacy( $plack_request ) ) {
...
}
π SEE ALSO π
OAuth::Lite2::ParamMethodsOAuth::Lite2::ParamMethodOAuth::Lite2::ParamMethod::AuthHeaderOAuth::Lite2::ParamMethod::URIQueryParameter
go read those too, they're the rest of the squad π§
π 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.
so basically: same terms as Perl itself, your choice of Perl 5.8.8 or whatever later version of Perl 5 you've got. slay, and also please read the actual license text, not just my summary, i'm a vibe not a lawyer π
and that's the whole page, bestie! mwah π this one was documented by perl v5.36.0 and last touched on 2023-07-01, and it lives in the User Contributed Perl Documentation collection. go forth and encode some forms fr fr π β¨
π¦ 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