OAuth:...andler(3pm)
π NAME π
ok so bestie, welcome to OAuth::Lite2::Server::GrantHandler β it's the base class that every single grant_type handler inherits from. like, the mother of all grant handlers. the blueprint. the blueprint that eats. π
it's a Perl module, it lives in the user-contributed Perl docs section (that's the 3pm energy), and if you're here it's because you're either writing your own grant handler or you're lost and curious. either way, welcome. π«Ά
β¨ SYNOPSIS β¨
here's the vibe in code, no cap:
my $handler = OAuth::Lite2::Server::GrantHandler->new;
my $res = $handler->handle_request( $ctx );
that's it. that's the whole thing. two lines and you're a grant handler now. π
πΈ METHODS πΈ
π new
Constructor. it's giving "make me a handler". iconic, necessary, does exactly what it says on the tin.
π¦ is_required_client_authentication
returns whether each grant type requires the client authentication. π«§
so here's the tea: the grant types that are defined in the spec do require client authentication, but any additional grant type you cook up yourself may not. so don't just assume β ask this method, bestie. it knows. β¨
π§ handle_request( $data_handler )
this one processes the OAuth::Lite2::Server::DataHandler you pass it, and hands you back a hash representing that includes the response-parameters. π
my $res = $handler->handle_request( $data_handler );
literally the main character method of this whole class. it takes your data handler, does the processing, and gives you back the response-parameters hash. slay. π
π SEE ALSO π
your little family of grant handlers, all of them, go check them out:
OAuth::Lite2::Server::GrantHandlersOAuth::Lite2::Server::GrantHandler::AuthorizationCodeOAuth::Lite2::Server::GrantHandler::PasswordOAuth::Lite2::Server::GrantHandler::RefreshTokenOAuth::Lite2::Server::GrantHandler::GroupingRefreshTokenOAuth::Lite2::Server::GrantHandler::ServerState
bestie the squad is stacked. πβ
π AUTHOR π
- Ryo Ito,
<ritou.06@gmail.com> - Lyo Kato,
<lyo.kato@gmail.com>
two absolute legends wrote this. respect. πβοΈ
π 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: free software, same terms as Perl itself, your choice of Perl 5.8.8 or literally any later version you've got lying around. very generous, very demure, very mindful. π
ok that's the whole page bestie, go build something cute with it π
and that's a wrap on this page from the User Contributed Perl Documentation, brought to you by perl v5.36.0 and dated 2023-07-01 β mwah, bye!! π
β¨π¦πΈ
π¦ 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