OAuth::Lite2::ParamMethod::AuthHeader(3pm) | User Contributed Perl Documentation | OAuth::Lite2::ParamMethod::AuthHeader(3pm) |
OAuth::Lite2::ParamMethod::AuthHeader - builder/parser for OAuth 2.0 AuthHeader type of parameter
my $meth = OAuth::Lite2::ParamMethod::AuthHeader->new; # server side if ($meth->match( $plack_request )) { my ($token, $params) = $meth->parse( $plack_request ); } # client side my $http_req = $meth->request_builder(...);
builder/parser for OAuth 2.0 AuthHeader type of parameter
Constructor
Returns true if passed Plack::Request object is matched for the type of this method.
if ( $meth->match( $plack_request ) ) { ... }
Parse the Plack::Request, and returns access token and oauth parameters.
my ($token, $params) = $meth->parse( $plack_request );
Build HTTP::Request object.
my $req = $meth->build_request( url => $url, method => $http_method, token => $access_token, oauth_params => $oauth_params, params => $params, content => $content, headers => $headers, );
Returns true if passed Plack::Request object is based draft version 10.
if ( $meth->is_legacy( $plack_request ) ) { ... }
Returns Hash reference if passed Plack::Request object has client credentials in Authorization header.
my $basic_clientcredentials = $meth->basic_credentials( $plack_request ); if( defined($basic_clientcredentials) ){ my $client_id = $basic_clientcredentials->{client_id}; my $client_secret = $basic_clientcredentials->{client_secret}; }
OAuth::Lite2::ParamMethods OAuth::Lite2::ParamMethod OAuth::Lite2::ParamMethod::FormEncodedBody OAuth::Lite2::ParamMethod::URIQueryParameter
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.
2023-07-01 | perl v5.36.0 |