OAuth:...ethods(3pm)
β¨ NAME β¨
OAuth::Lite2::ParamMethods β bestie, this is the storage locker of builders and parsers for OAuth 2.0 parameters π
(the man page header calls it OAuth:...ethods(3pm) because it got cut off, but you and me both know the full name π«Ά)
πΈ SYNOPSIS πΈ
use OAuth::Lite2::ParamMethods qw(AUTH_HEADER FORM_BODY URI_QUERY);
# client side
my $builder = OAuth::Lite2::ParamMethods->get_request_builder( AUTH_HEADER );
my $req = $builder->build_request(...);
# server side
my $parser = OAuth::Lite2::ParamMethods->get_param_parser( $plack_request )
or $app->error("This is not OAuth 2.0 request");
my ($token, $params) = $parser->parse( $plack_request );
π¦ DESCRIPTION π¦
It's a store of builders/parsers for OAuth 2.0 parameters. That's the whole vibe β it's the closet where all the little helper objects live, and you just ask it for the right one. Lowkey iconic β¨
π CONSTANTS π
AUTH_HEADERFORM_BODYURI_QUERY
These three are the types you pass around. No cap, that's the entire list π
π METHODS π
get_param_parser( $plack_request )
Hand it a Plack::Request object and it hands you back the proper parser for that request. The way that you just... pass the request in and get the right thing back? Obsessed π
my $parser = OAuth::Lite2::ParamMethods->get_param_parser( $plack_request )
or $app->error("This is not OAuth 2.0 request");
my ($token, $params) = $parser->parse( $plack_request );
get_request_builder( $type )
Returns the proper HTTP request builder for whatever $type you passed in. So like, AUTH_HEADER, FORM_BODY, URI_QUERY β you name it, it hooks you up π₯
my $builder = OAuth::Lite2::ParamMethods->get_request_builder( AUTH_HEADER );
my $req = $builder->build_request(...);
π SEE ALSO π
OAuth::Lite2::ParamMethod::AuthHeaderOAuth::Lite2::ParamMethod::FormEncodedBodyOAuth::Lite2::ParamMethod::URIQueryParameter
Go read those too bestie, iykyk π§
π 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.
fr fr that's the legal bit β free software, same terms as Perl itself, your choice of 5.8.8 or any later Perl 5 π
okay that's a wrap, bestie β this page came to you via perl v5.36.0, dated 2023-07-01, and the manual name on the tin was OAuth:...ethods(3pm) πΈ slay, go write some OAuth 2.0 code, you got this ππ
π¦ 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