NAME
Net::Vimeo::OAuth - OAuth for Vimeo Advanced API
DESCRIPTION
Net::Vimeo::OAuth is a role that provides OAuth authentication for Vimeo Advanced API.
SYNOPSIS
# First you need to authorize user to access data:
my $vimeo = Net::Vimeo->new(
consumer_key => 'your_app_key',
consumer_secret => 'your_app_secret_key',
);
# To get access tokens you need the oauth_verifier,
# request_token and request_token secret. The last two
# were obtain when you got the authorization url. Vimeo
# redirects user to application, passing the oauth_verifier
# The oauth_verifier will be obtain after you give access
# to your application.
my $auth_url = $vimeo_oauth->get_authorization_url();
my $verifier = 'oauth_verifier_code';
$vimeo_oauth->get_access_token( { verifier => $verifier } );
# Now you have your access tokens and do not need to go through
# this process every time you make an api request
print "Access token: " . $self->access_token . "\n";
print "Accesss token secret: " . $self->access_token_secret . "\n";
DESCRIPTION
Net::Vimeo::OAuth is a perl interface to Vimeo Advanced API
METHODS
-
Get the URL needed to authorzie the user. It returns an
URI
object. When you get this URL it will be generated a request token and a request token secret that will be used later to get access tokens. - get_request_token
-
Get request tokens that later can be exchanged with access tokens.
- get_access_token
-
In order to use Vimeo Advanced API you will need access tokens. This is the final step in authorizing you app. Given the request tokens and the oauth verifier from
get_authorization_url
you can exchange it with access tokens.An access_token is the key you get from a user which allows your app to act on behalf of a user. Usually your application will collect an acceess_token by sending the user to a callback, an URL where the user can decide if she grants access or not. Vimeo provides a readily available access_token for your own account on your private developer page where you register your app.
- access_token
-
Set the acceee_token with this method. (provided via Net::OAuth)
- access_token_secret
-
Set the acceee_token_secret with this method. (provided via Net::OAuth)
SEE ALSO
AUTHOR
Mirela Iclodean, <imirela at cpan.org>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.