| |
- __builtin__.object
-
- OAuthClient
- OAuthConsumer
- OAuthDataStore
- OAuthRequest
- OAuthServer
- OAuthSignatureMethod
-
- OAuthSignatureMethod_HMAC_SHA1
- OAuthSignatureMethod_PLAINTEXT
- OAuthToken
- exceptions.RuntimeError(exceptions.StandardError)
-
- OAuthError
class OAuthConsumer(__builtin__.object) |
|
# OAuthConsumer is a data type that represents the identity of the Consumer
# via its shared secret with the Service Provider. |
|
Methods defined here:
- __init__(self, key, secret)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- key = None
- secret = None
|
class OAuthDataStore(__builtin__.object) |
|
# OAuthDataStore is a database abstraction used to lookup consumers and tokens |
|
Methods defined here:
- authorize_request_token(self, oauth_token, user)
- fetch_access_token(self, oauth_consumer, oauth_token)
- fetch_request_token(self, oauth_consumer)
- lookup_consumer(self, key)
- lookup_nonce(self, oauth_consumer, oauth_token, nonce, timestamp)
- lookup_token(self, oauth_consumer, token_type, token_token)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class OAuthRequest(__builtin__.object) |
|
OAuth parameters:
- oauth_consumer_key
- oauth_token
- oauth_signature_method
- oauth_signature
- oauth_timestamp
- oauth_nonce
- oauth_version
... any additional parameters, as defined by the Service Provider. |
|
Methods defined here:
- __init__(self, http_method='GET', http_url=None, parameters=None)
- build_signature(self, signature_method, consumer, token)
- get_nonoauth_parameters(self)
- # get any non-oauth parameters
- get_normalized_http_method(self)
- # just uppercases the http method
- get_normalized_http_url(self)
- # parses the url and rebuilds it to be scheme://host/path
- get_normalized_parameters(self)
- # return a string that consists of all the parameters that need to be signed
- get_parameter(self, parameter)
- set_parameter(self, parameter, value)
- sign_request(self, signature_method, consumer, token)
- # set the signature parameter to the result of build_signature
- to_header(self, realm='')
- # serialize as a header for an HTTPAuth request
- to_postdata(self)
- # serialize as post data for a POST request
- to_url(self)
- # serialize as a url for a GET request
Static methods defined here:
- from_consumer_and_token(oauth_consumer, token=None, http_method='GET', http_url=None, parameters=None)
- from_request(http_method, http_url, headers=None, parameters=None, query_string=None)
- from_token_and_callback(token, callback=None, http_method='GET', http_url=None, parameters=None)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- http_method = 'GET'
- http_url = None
- parameters = None
- version = '1.0'
|
class OAuthServer(__builtin__.object) |
|
# OAuthServer is a worker to check a requests validity against a data store |
|
Methods defined here:
- __init__(self, data_store=None, signature_methods=None)
- add_signature_method(self, signature_method)
- authorize_token(self, token, user)
- # authorize a request token
- build_authenticate_header(self, realm='')
- # optional support for the authenticate header
- fetch_access_token(self, oauth_request)
- # process an access_token request
# returns the access token on success
- fetch_request_token(self, oauth_request)
- # process a request_token request
# returns the request token on success
- get_callback(self, oauth_request)
- # get the callback url
- get_data_store(self)
- set_data_store(self, oauth_data_store)
- verify_request(self, oauth_request)
- # verify an api call, checks all the parameters
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- data_store = None
- signature_methods = None
- timestamp_threshold = 300
- version = '1.0'
|
class OAuthSignatureMethod(__builtin__.object) |
|
# OAuthSignatureMethod is a strategy class that implements a signature method |
|
Methods defined here:
- build_signature(self, oauth_request, oauth_consumer, oauth_token)
- build_signature_base_string(self, oauth_request, oauth_consumer, oauth_token)
- check_signature(self, oauth_request, consumer, token, signature)
- get_name(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class OAuthSignatureMethod_HMAC_SHA1(OAuthSignatureMethod) |
| |
- Method resolution order:
- OAuthSignatureMethod_HMAC_SHA1
- OAuthSignatureMethod
- __builtin__.object
Methods defined here:
- build_signature(self, oauth_request, consumer, token)
- build_signature_base_string(self, oauth_request, consumer, token)
- get_name(self)
Methods inherited from OAuthSignatureMethod:
- check_signature(self, oauth_request, consumer, token, signature)
Data descriptors inherited from OAuthSignatureMethod:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class OAuthSignatureMethod_PLAINTEXT(OAuthSignatureMethod) |
| |
- Method resolution order:
- OAuthSignatureMethod_PLAINTEXT
- OAuthSignatureMethod
- __builtin__.object
Methods defined here:
- build_signature(self, oauth_request, consumer, token)
- build_signature_base_string(self, oauth_request, consumer, token)
- get_name(self)
Methods inherited from OAuthSignatureMethod:
- check_signature(self, oauth_request, consumer, token, signature)
Data descriptors inherited from OAuthSignatureMethod:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class OAuthToken(__builtin__.object) |
|
# OAuthToken is a data type that represents an End User via either an access
# or request token. |
|
Methods defined here:
- __init__(self, key, secret)
- __str__(self)
- to_string(self)
Static methods defined here:
- from_string(s)
- # return a token from something like:
# oauth_token_secret=digg&oauth_token=digg
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- key = None
- secret = None
| |