MythTV master
Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
nv_python_libs.vimeo.oauth.oauth_api.OAuthServer Class Reference
Inheritance diagram for nv_python_libs.vimeo.oauth.oauth_api.OAuthServer:
[legend]
Collaboration diagram for nv_python_libs.vimeo.oauth.oauth_api.OAuthServer:
[legend]

Public Member Functions

def __init__ (self, data_store=None, signature_methods=None)
 
def set_data_store (self, data_store)
 
def get_data_store (self)
 
def add_signature_method (self, signature_method)
 
def fetch_request_token (self, oauth_request)
 
def fetch_access_token (self, oauth_request)
 
def verify_request (self, oauth_request)
 
def authorize_token (self, token, user)
 
def get_callback (self, oauth_request)
 
def build_authenticate_header (self, realm='')
 

Static Public Attributes

int timestamp_threshold = 300
 
 version = VERSION
 
 signature_methods = None
 
 data_store = None
 

Private Member Functions

def _get_version (self, oauth_request)
 
def _get_signature_method (self, oauth_request)
 
def _get_consumer (self, oauth_request)
 
def _get_token (self, oauth_request, token_type='access')
 
def _get_verifier (self, oauth_request)
 
def _check_signature (self, oauth_request, consumer, token)
 
def _check_timestamp (self, timestamp)
 
def _check_nonce (self, consumer, token, nonce)
 

Detailed Description

A worker to check the validity of a request against a data store.

Definition at line 368 of file oauth_api.py.

Constructor & Destructor Documentation

◆ __init__()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.__init__ (   self,
  data_store = None,
  signature_methods = None 
)

Definition at line 375 of file oauth_api.py.

Member Function Documentation

◆ _check_nonce()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_nonce (   self,
  consumer,
  token,
  nonce 
)
private
Verify that the nonce is uniqueish.

Definition at line 522 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_signature().

◆ _check_signature()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_signature (   self,
  oauth_request,
  consumer,
  token 
)
private

◆ _check_timestamp()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_timestamp (   self,
  timestamp 
)
private
Verify that timestamp is recentish.

Definition at line 512 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_signature().

◆ _get_consumer()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._get_consumer (   self,
  oauth_request 
)
private

◆ _get_signature_method()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._get_signature_method (   self,
  oauth_request 
)
private
Figure out the signature with some defaults.

Definition at line 458 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._check_signature().

◆ _get_token()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._get_token (   self,
  oauth_request,
  token_type = 'access' 
)
private

◆ _get_verifier()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._get_verifier (   self,
  oauth_request 
)
private

◆ _get_version()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer._get_version (   self,
  oauth_request 
)
private

◆ add_signature_method()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.add_signature_method (   self,
  signature_method 
)

Definition at line 385 of file oauth_api.py.

◆ authorize_token()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.authorize_token (   self,
  token,
  user 
)
Authorize a request token.

Definition at line 436 of file oauth_api.py.

◆ build_authenticate_header()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.build_authenticate_header (   self,
  realm = '' 
)
Optional support for the authenticate header.

Definition at line 444 of file oauth_api.py.

◆ fetch_access_token()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.fetch_access_token (   self,
  oauth_request 
)
Processes an access_token request and returns the
access token on success.

Definition at line 409 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.fetch_access_token().

◆ fetch_request_token()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.fetch_request_token (   self,
  oauth_request 
)
Processes a request_token request and returns the
request token on success.

Definition at line 389 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.fetch_request_token().

◆ get_callback()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.get_callback (   self,
  oauth_request 
)
Get the callback URL.

Definition at line 440 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.fetch_request_token().

◆ get_data_store()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.get_data_store (   self)

Definition at line 382 of file oauth_api.py.

◆ set_data_store()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.set_data_store (   self,
  data_store 
)

Definition at line 379 of file oauth_api.py.

◆ verify_request()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.verify_request (   self,
  oauth_request 
)
Verifies an api call and checks all the parameters.

Definition at line 425 of file oauth_api.py.

Member Data Documentation

◆ data_store

nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.data_store = None
static

◆ signature_methods

nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.signature_methods = None
static

◆ timestamp_threshold

int nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.timestamp_threshold = 300
static

◆ version

nv_python_libs.vimeo.oauth.oauth_api.OAuthServer.version = VERSION
static

The documentation for this class was generated from the following file: