Package restkit :: Module oauth2 :: Class Request
[hide private]

Class Request

source code

object --+    
         |    
      dict --+
             |
            Request

The parameters and information for an HTTP request, suitable for authorizing with OAuth credentials.

When a consumer wants to access a service's protected resources, it does so using a signed HTTP request identifying itself (the consumer) with its key, and providing an access token authorized by the end user to access those resources.

Instance Methods [hide private]
new empty dictionary

__init__(self, method='GET', url=None, parameters=None, body='', is_form_encoded=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_get_timestamp_nonce(self) source code
 
get_nonoauth_parameters(self)
Get any non-OAuth parameters.
source code
 
to_header(self, realm='')
Serialize as a header for an HTTPAuth request.
source code
 
to_postdata(self)
Serialize as post data for a POST request.
source code
 
to_url(self)
Serialize as a URL for a GET request.
source code
 
get_parameter(self, parameter) source code
 
get_normalized_parameters(self)
Return a string that contains the parameters that must be signed.
source code
 
sign_request(self, signature_method, consumer, token)
Set the signature parameter to the result of sign.
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]
 
make_timestamp(cls)
Get seconds since epoch (UTC).
source code
 
make_nonce(cls)
Generate pseudorandom number.
source code
 
from_request(cls, http_method, http_url, headers=None, parameters=None, query_string=None)
Combines multiple parameter sources.
source code
 
from_consumer_and_token(cls, consumer, token=None, http_method='GET', http_url=None, parameters=None, body='', is_form_encoded=False) source code
 
from_token_and_callback(cls, token, callback=None, http_method='GET', http_url=None, parameters=None) source code
Static Methods [hide private]
 
_split_header(header)
Turn Authorization: header into parameters.
source code
 
_split_url_string(param_str)
Turn URL string into parameters.
source code
Class Variables [hide private]
  version = '1.0'

Inherited from dict: __hash__

Properties [hide private]
  url
  method

Inherited from object: __class__

Method Details [hide private]

__init__(self, method='GET', url=None, parameters=None, body='', is_form_encoded=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

Property Details [hide private]

url

Get Method:
unreachable.getter(self)
Set Method:
unreachable.url(self, value)
Delete Method:
unreachable.deleter(self)

method

Get Method:
unreachable.getter(self)
Set Method:
unreachable.method(self, value)
Delete Method:
unreachable.deleter(self)