Package restkit :: Module oauth2
[hide private]

Module oauth2

source code


Version: 4.2.1

Classes [hide private]
  Error
Generic exception class.
  MissingSignature
  Consumer
A consumer of OAuth-protected services.
  Token
An OAuth credential used to request authorization or a protected resource.
  Request
The parameters and information for an HTTP request, suitable for authorizing with OAuth credentials.
  SignatureMethod
A way of signing requests.
  SignatureMethod_HMAC_SHA1
  SignatureMethod_PLAINTEXT
Functions [hide private]
 
build_authenticate_header(realm='')
Optional WWW-Authenticate header (401 error)
source code
 
build_xoauth_string(url, consumer, token=None)
Build an XOAUTH string for use in SMTP/IMPA authentication.
source code
 
to_unicode(s)
Convert to unicode, raise exception with instructive error message if s is not unicode, ascii, or utf-8.
source code
 
to_utf8(s) source code
 
to_unicode_if_string(s) source code
 
to_utf8_if_string(s) source code
 
to_unicode_optional_iterator(x)
Raise TypeError if x is a str containing non-utf8 bytes or if x is an iterable which contains such a str.
source code
 
to_utf8_optional_iterator(x)
Raise TypeError if x is a str or if x is an iterable which contains a str.
source code
 
escape(s)
Escape a URL including any /.
source code
 
generate_timestamp()
Get seconds since epoch (UTC).
source code
 
generate_nonce(length=8)
Generate pseudorandom number.
source code
 
generate_verifier(length=8)
Generate pseudorandom number.
source code
 
setter(attr) source code
Variables [hide private]
  OAUTH_VERSION = '1.0'
  HTTP_METHOD = 'GET'
  SIGNATURE_METHOD = 'PLAINTEXT'
  __package__ = 'restkit'