OAuth::Lite::Token - token class
my $token = OAuth::Lite::Token->new( token => 'foo', secret => 'bar', ); # or my $token = OAuth::Lite::Token->new; $tokne->token('foo'); $secret->secret('bar'); # and you also can make token which two params are filled in with random values. my $token = OAuth::Lite::Token->new_random; say $token->token; say $token->secret; my $encoded = $token->as_encoded; say $encoded; my $new_token = OAuth::Lite::Token->from_encoded($encoded); say $new_token->token; say $new_token->secret;
Token class.
Generate new object. and automatically filled token and secret value with random key.
my $t = OAuth::Lite::Token->new_random; say $t->token; say $t->secret;
Getter/Setter for token value.
$token->token('foo'); say $token->token;
Getter/Setter for secret value.
$token->secret('bar'); say $token->secret;
Generate token from encoded line (that service provider provides as response of request token.).
my $line = "oauth_token=foo&oauth_token_secret=bar"; my $token = OAuth::Lite::Token->from_encoded($encoded); say $token->token; say $token->secret;
Returns encoded line from token object.
my $token = OAuth::Lite::Token->new( token => 'foo', secret => 'bar', ); say $token->as_encoded; #oauth_token=foo&oauth_token_secret=bar
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.