OAuth::Lite2::Signer(3pm) | User Contributed Perl Documentation | OAuth::Lite2::Signer(3pm) |
OAuth::Lite2::Signer - OAuth 2.0 signature (DEPRECATED)
my $signed_params = OAuth::Lite2::Signer->sign( secret => q{my_token_secret}, algorithm => q{hmac-sha256}, method => q{GET}, url => q{http://example.org/protected/resource}, );
DEPRECATED. This is for old version of OAuth 2.0 draft specification.
This is for client to generate signed request, or for server to verify received request.
Returns the hash reference that includes parameters for OAuth 2.0 signed request.
my $signed_params = OAuth::Lite2::Signer->sign( secret => q{my_token_secret}, algorithm => q{hmac-sha256}, method => q{GET}, url => q{http://example.org/protected/resource}, );
Returns normalized string according to the specification.
Verify a signed request.
unless ( OAuth::Lite2::Signer->verify( %params ) ) { $app->error("Invalid request"); }
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 |