Net::O...ssword(3pm)

πŸ’– Net::OAuth2::Profile::Password β€” the manual, but make it cute πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation, and it's called Net::O...ssword (that's Net::OAuth2::Profile::Password if we're being ✨formal✨). It's a Perl module. It's giving OAuth2. It's giving web-server energy. Let's get into it. πŸ¦‹


🌸 NAME 🌸

Net::OAuth2::Profile::Password β€” OAuth2 for web-server use. that's it, that's the whole vibe. πŸ’…


🌈 INHERITANCE 🌈

 Net::OAuth2::Profile::Password
   is a Net::OAuth2::Profile

so it's a child of Net::OAuth2::Profile. it inherited the good genes, no cap. πŸ‘‘


✨ SYNOPSIS ✨

the little taste test, the appetizer, the trailer before the movie:

my $auth = Net::OAuth2::Profile::Password->new(...);
$auth->get_access_token(...);

literally two lines. iconic behavior honestly. πŸŽ€


πŸ’œ DESCRIPTION πŸ’œ

it extends "DESCRIPTION" in Net::OAuth2::Profile. so like, go read that one too, this one's building on it, fr fr.


🫢 METHODS 🫢

it extends "METHODS" in Net::OAuth2::Profile. same deal, bestie β€” this is the sequel, not a reboot. πŸ’–


🧚 Constructors 🧚

extends "Constructors" in Net::OAuth2::Profile. (so much extending, we love a modular queen)

Net::OAuth2::Profile::Password->new(%options)

here's the full tea on every option, and where it came from, and what it defaults to. and yes, we're keeping the table header exactly, because details are sacred:

 -Option           --Defined in          --Default
  client_id          Net::OAuth2::Profile  <required>
  client_secret      Net::OAuth2::Profile  <required>
  grant_type         Net::OAuth2::Profile  'password'
  hd                 Net::OAuth2::Profile  undef
  scope              Net::OAuth2::Profile  undef
  secrets_in_params  Net::OAuth2::Profile  <true>
  site               Net::OAuth2::Profile  undef
  state              Net::OAuth2::Profile  undef
  token_scheme       Net::OAuth2::Profile  'auth-header:Bearer'
  user_agent         Net::OAuth2::Profile  <created internally>

and now the breakdown, one by one, no skipping, no summarizing, we do NOT do that here:

  • client_id => STRING
  • client_secret => STRING
  • grant_type => STRING
  • hd => STRING
  • scope => STRING
  • secrets_in_params => BOOLEAN
  • site => URI
  • state => STRING
  • token_scheme => SCHEME
  • user_agent => LWP::UserAgent object

πŸŽ€ Accessors πŸŽ€

extends "Accessors" in Net::OAuth2::Profile. every single one of these is inherited, and we are listing every single one, because that's the rules:

  • $obj->bearer_token_scheme() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->grant_type() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->hd() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->id() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->scope() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->secret() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->site() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->state() β€” inherited, see "Accessors" in Net::OAuth2::Profile
  • $obj->user_agent() β€” inherited, see "Accessors" in Net::OAuth2::Profile

πŸ”₯ Actions πŸ”₯

extends "Actions" in Net::OAuth2::Profile. yep. that's the whole section. it's a short king. πŸ‘‘


⭐ Helpers ⭐

extends "Helpers" in Net::OAuth2::Profile. and here's every helper, all inherited, all accounted for:

  • $obj->add_token($request, $token, $scheme) β€” inherited, see "Helpers" in Net::OAuth2::Profile
  • $obj->build_request($method, $uri, $params) β€” inherited, see "Helpers" in Net::OAuth2::Profile
  • $obj->params_from_response($response, $reason) β€” inherited, see "Helpers" in Net::OAuth2::Profile
  • $obj->site_url( <$uri|$path>, $params ) β€” inherited, see "Helpers" in Net::OAuth2::Profile

πŸ’… Action πŸ’…

(the singular. the main character. the one that actually does the thing.)

$obj->get_access_token(%options)

 -Option  --Default
  password  <required>
  username  <required>
  • password => PASSWORD
  • username => USER

both of these are <required>, bestie. no defaults, no shortcuts. bring your own credentials. πŸ™ˆ


πŸ‘‘ 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/


and that's the whole page, bestie. you understood it, you slayed it, you're basically a Perl girlie now. periodt. πŸ’–

sign-off time πŸŽ€βœ¨ this little love letter of a manual is perl v5.32.1, dated 2021-10-15, and it lives under the name Net::O...ssword(3pm). bye babes, go get that access token πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from