Class: Vimeo::Advanced::Auth

Inherits:
Base
  • Object
show all
Defined in:
lib/vimeo/advanced/auth.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_link, #upload_sig

Constructor Details

This class inherits a constructor from Vimeo::Advanced::Base

Instance Method Details

#check_token(auth_token) ⇒ Object

Tests the validity of an authorization token.



24
25
26
27
28
29
30
31
# File 'lib/vimeo/advanced/auth.rb', line 24

def check_token(auth_token)
  sig_options = {
    :auth_token => auth_token,
    :method => "vimeo.auth.checkToken"
  }
  
  make_request sig_options
end

#get_frobObject

Obtains a frob. Used for desktop based authentication.



17
18
19
20
21
# File 'lib/vimeo/advanced/auth.rb', line 17

def get_frob
  sig_options = { :method => "vimeo.auth.getFrob" }
  
  make_request sig_options
end

#get_token(frob) ⇒ Object

Obtains an authorization token.



6
7
8
9
10
11
12
13
# File 'lib/vimeo/advanced/auth.rb', line 6

def get_token(frob)
  sig_options = {
    :frob => frob,
    :method => "vimeo.auth.getToken"
  }
  
  make_request sig_options
end