OAuth::Lite::SignatureMethod::PLAINTEXT - PLAINTEXT signature method class;
# Consumer side my $method = OAuth::Lite::SignatureMethod::PLAINTEXT->new( consumer_secret => 'foo', token_secret => 'bar', ); my $signature = $method->sign($base_string); # Service Provider side my $method = OAuth::Lite::SignatureMethod::PLAINTEXT->new( consumer_secret => 'foo', token_secret => 'bar', ); unless ($method->verify($base_string, $signature)) { say "Signature is invalid!"; }
PLAINTEXT signature method class.
Class method. Returns this method's name.
say OAuth::Lite::SignatureMethod::PLAINTEXT->method_name; # PLAINTEXT
my $method = OAuth::Lite::SignatureMethod::PLAINTEXT->new( consumer_secret => $consumer_secret, token_secret => $bar, );
Generate signature from base string.
my $signature = $method->sign($base_string);
Verify signature with base string.
my $signature_is_valid = $method->verify($base_string, $signature); unless ($signature_is_valid) { say "Signature is invalid!"; }
Lyo Kato, lyo.kato _at_ gmail.com
lyo.kato _at_ gmail.com
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.6 or, at your option, any later version of Perl 5 you may have available.
To install OAuth::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OAuth::Lite
CPAN shell
perl -MCPAN -e shell install OAuth::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.