OAuth:...ethods(3pm)

πŸ“¦
version 0.11 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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_HEADER
  • FORM_BODY
  • URI_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::AuthHeader
  • OAuth::Lite2::ParamMethod::FormEncodedBody
  • OAuth::Lite2::ParamMethod::URIQueryParameter

Go read those too bestie, iykyk 🧚


πŸ’œ AUTHOR πŸ’œ

Lyo Kato, <lyo.kato@gmail.com>


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