Package u1rest :: Package lib :: Package auth :: Module baseauth :: Class BaseAuthenticator
[hide private]
[frames] | no frames]

Class BaseAuthenticator

source code

object --+
         |
        BaseAuthenticator
Known Subclasses:

A base OAuthAuthenticator.

Instance Methods [hide private]
 
_authorize_credentials(self, email)
Authorize the OAuth SSO Request Token.
source code
 
_test_credentials(self)
Test the OAuth token against Ubuntu One.
source code
 
get_auth_headers(self, url, params, http_method)
Get authentication headers to be sent with the request.
source code
 
get_consumer_and_token(self)
Get consumer and token from credentials.
source code
 
get_request_token(self, token_name, email, password)
Get an OAuth request token from SSO.
source code
 
load_credentials(self)
Load the credentials.
source code
 
simple_signed_get_request(self, url)
Handle a simple signed request.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _credentials = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_auth_headers(self, url, params, http_method)

source code 

Get authentication headers to be sent with the request.

Parameters:
  • url - The URL being requested.
  • params - A {dict} of quesry string parameters
  • http_method - The HTTP Method being used.

get_request_token(self, token_name, email, password)

source code 

Get an OAuth request token from SSO.

Parameters:
  • token_name - A Name to give the OAuth Token.
  • email - Your SSO Email.
  • password - Your SSO Password.

load_credentials(self)

source code 

Load the credentials.

To be overridden by subclasses.

simple_signed_get_request(self, url)

source code 

Handle a simple signed request.

Parameters:
  • url - The URL to sign and get.