Why not adopt me?
NAME
Net::OAuth2::Moosey::AccessToken - OAuth 2.0 Access token object
VERSION
0.01
SYNOPSIS
Used by Net::OAuth2::Moosey::Client.
my $client = Net::OAuth2::Moosey::Client->new( %client_params );
my $token_object = $client->access_token_object();
my $access_token = $token_object->valid_access_token();
METHODS
new
ATTRIBUTES
- user_agent <LWP::UserAgent>
- client_id <Str>
- client_secret <Str>
- access_token_url <Uri>
- access_token <Str>
-
The access token
- refresh_token <Str>
-
The refresh token
- token_store <Str>
- token_type <Str>
-
The token type as returned by your service provider.
- expires_at <Int>
-
The unix timestamp when the access token will expire
- expires_in <Int>
-
Seconds until the access token will expire. Only really useful for setting an expiry time in the future, then use expires_at to test against.
valid_access_token
Returns a valid access token (refreshing if necessary)
to_string
Create a string representation of this token
sync_with_store
Sync with the store file. First reads out the current data from the file, and then compares the current known data with that found in the file to identify which is the freshest. Writes the resulting freshest back to the store again for reuse next time.
NAME
Net::OAuth2::Moosey::AccessToken - OAuth Access Token
SEE ALSO
LICENSE AND COPYRIGHT
Copyright 2011 Robin Clarke
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.