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

Public Member Functions

def __init__ (self, http_method=HTTP_METHOD, http_url=None, parameters=None)
 
def set_parameter (self, parameter, value)
 
def get_parameter (self, parameter)
 
def get_nonoauth_parameters (self)
 
def to_header (self, realm='')
 
def to_postdata (self)
 
def to_url (self)
 
def get_normalized_parameters (self)
 
def get_normalized_http_method (self)
 
def get_normalized_http_url (self)
 
def sign_request (self, signature_method, consumer, token)
 
def build_signature (self, signature_method, consumer, token)
 
def from_request (http_method, http_url, headers=None, parameters=None, query_string=None)
 
def from_consumer_and_token (oauth_consumer, token=None, callback=None, verifier=None, http_method=HTTP_METHOD, http_url=None, parameters=None)
 
def from_token_and_callback (token, callback=None, http_method=HTTP_METHOD, http_url=None, parameters=None)
 

Static Public Attributes

 parameters = None
 
 http_method = HTTP_METHOD
 
 http_url = None
 
 version = VERSION
 
 from_request = staticmethod(from_request)
 
 from_consumer_and_token = staticmethod(from_consumer_and_token)
 
 from_token_and_callback = staticmethod(from_token_and_callback)
 

Private Member Functions

def _get_timestamp_nonce (self)
 
def _split_header (header)
 
def _split_url_string (param_str)
 

Static Private Attributes

 _split_header = staticmethod(_split_header)
 
 _split_url_string = staticmethod(_split_url_string)
 

Detailed Description

OAuthRequest represents the request and can be serialized.

OAuth parameters:
    - oauth_consumer_key
    - oauth_token
    - oauth_signature_method
    - oauth_signature
    - oauth_timestamp
    - oauth_nonce
    - oauth_version
    - oauth_verifier
    ... any additional parameters, as defined by the Service Provider.

Definition at line 155 of file oauth_api.py.

Constructor & Destructor Documentation

◆ __init__()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.__init__ (   self,
  http_method = HTTP_METHOD,
  http_url = None,
  parameters = None 
)

Definition at line 174 of file oauth_api.py.

Member Function Documentation

◆ _get_timestamp_nonce()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest._get_timestamp_nonce (   self)
private

Definition at line 188 of file oauth_api.py.

◆ _split_header()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest._split_header (   header)
private
Turn Authorization: header into parameters.

Definition at line 343 of file oauth_api.py.

◆ _split_url_string()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest._split_url_string (   param_str)
private
Turn URL string into parameters.

Definition at line 360 of file oauth_api.py.

◆ build_signature()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.build_signature (   self,
  signature_method,
  consumer,
  token 
)
Calls the build signature method within the signature method.

Definition at line 260 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthSignatureMethod.check_signature(), and nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.sign_request().

◆ from_consumer_and_token()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_consumer_and_token (   oauth_consumer,
  token = None,
  callback = None,
  verifier = None,
  http_method = HTTP_METHOD,
  http_url = None,
  parameters = None 
)

Definition at line 300 of file oauth_api.py.

◆ from_request()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_request (   http_method,
  http_url,
  headers = None,
  parameters = None,
  query_string = None 
)
Combines multiple parameter sources.

Definition at line 264 of file oauth_api.py.

◆ from_token_and_callback()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_token_and_callback (   token,
  callback = None,
  http_method = HTTP_METHOD,
  http_url = None,
  parameters = None 
)

Definition at line 330 of file oauth_api.py.

◆ get_nonoauth_parameters()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.get_nonoauth_parameters (   self)
Get any non-OAuth parameters.

Definition at line 192 of file oauth_api.py.

◆ get_normalized_http_method()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.get_normalized_http_method (   self)
Uppercases the http method.

Definition at line 236 of file oauth_api.py.

◆ get_normalized_http_url()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.get_normalized_http_url (   self)
Parses the URL and rebuilds it to be scheme://host/path.

Definition at line 240 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.to_url().

◆ get_normalized_parameters()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.get_normalized_parameters (   self)
Return a string that contains the parameters that must be signed.

Definition at line 220 of file oauth_api.py.

◆ get_parameter()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.get_parameter (   self,
  parameter 
)

◆ set_parameter()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.set_parameter (   self,
  parameter,
  value 
)

◆ sign_request()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.sign_request (   self,
  signature_method,
  consumer,
  token 
)
Set the signature parameter to the result of build_signature.

Definition at line 251 of file oauth_api.py.

◆ to_header()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.to_header (   self,
  realm = '' 
)
Serialize as a header for an HTTPAuth request.

Definition at line 201 of file oauth_api.py.

◆ to_postdata()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.to_postdata (   self)
Serialize as post data for a POST request.

Definition at line 211 of file oauth_api.py.

Referenced by nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.to_url().

◆ to_url()

def nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.to_url (   self)
Serialize as a URL for a GET request.

Definition at line 216 of file oauth_api.py.

Member Data Documentation

◆ _split_header

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest._split_header = staticmethod(_split_header)
staticprivate

Definition at line 358 of file oauth_api.py.

◆ _split_url_string

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest._split_url_string = staticmethod(_split_url_string)
staticprivate

Definition at line 366 of file oauth_api.py.

◆ from_consumer_and_token

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_consumer_and_token = staticmethod(from_consumer_and_token)
static

Definition at line 328 of file oauth_api.py.

◆ from_request

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_request = staticmethod(from_request)
static

Definition at line 298 of file oauth_api.py.

◆ from_token_and_callback

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.from_token_and_callback = staticmethod(from_token_and_callback)
static

Definition at line 341 of file oauth_api.py.

◆ http_method

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.http_method = HTTP_METHOD
static

◆ http_url

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.http_url = None
static

◆ parameters

nv_python_libs.vimeo.oauth.oauth_api.OAuthRequest.parameters = None
static

◆ version

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

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