Net::PMP::AuthToken - authorization token for Net::PMP::Client
use Net::PMP::Client; my $host = 'https://api-sandbox.pmp.io'; my $client_id = 'i-am-a-client'; my $client_secret = 'i-am-a-secret'; # instantiate a client my $client = Net::PMP::Client->new( host => $host, id => $client_id, secret => $client_secret, ) or die "Can't connect to server $host: " . $Net::PMP::Client::Error; # authenticate my $token = $client->get_token(); if ($token->expires_in() < 10) { die "Access token expires too soon. Not enough time to make a request. Mayday, mayday!"; } printf("PMP token is: %s\n, $token->as_string());
Net::PMP::AuthToken is the object representation of an authorization token.
Alias for token_expires_in.
Returns the access_token. Objects are overloaded to stringify with as_string().
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-net-pmp at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-PMP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-pmp at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::PMP::AuthToken
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-PMP
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-PMP
CPAN Ratings
http://cpanratings.perl.org/d/Net-PMP
Search CPAN
http://search.cpan.org/dist/Net-PMP/
American Public Media and the Public Media Platform sponsored the development of this module.
Copyright 2013 American Public Media Group
See the LICENSE file that accompanies this module.
To install Net::PMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::PMP
CPAN shell
perl -MCPAN -e shell install Net::PMP
For more information on module installation, please visit the detailed CPAN module installation guide.