Public Member Functions | Private Member Functions
tornado.auth.OAuthMixin Class Reference
Inheritance diagram for tornado.auth.OAuthMixin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def authorize_redirect
def get_authenticated_user

Private Member Functions

def _oauth_access_token_url
def _oauth_get_user
def _oauth_request_parameters
def _oauth_request_token_url
def _on_access_token
def _on_oauth_get_user
def _on_request_token

Detailed Description

Abstract implementation of OAuth.

See TwitterMixin and FriendFeedMixin below for example implementations.

Definition at line 209 of file auth.py.


Member Function Documentation

def tornado.auth.OAuthMixin._oauth_access_token_url (   self,
  request_token 
) [private]

Definition at line 317 of file auth.py.

def tornado.auth.OAuthMixin._oauth_get_user (   self,
  access_token,
  callback 
) [private]

Reimplemented in tornado.auth.GoogleMixin, tornado.auth.FriendFeedMixin, and tornado.auth.TwitterMixin.

Definition at line 351 of file auth.py.

def tornado.auth.OAuthMixin._oauth_request_parameters (   self,
  url,
  access_token,
  parameters = {},
  method = "GET" 
) [private]
Returns the OAuth parameters as a dict for the given request.

parameters should include all POST arguments and query string arguments
that will be sent with the request.

Definition at line 361 of file auth.py.

def tornado.auth.OAuthMixin._oauth_request_token_url (   self,
  callback_uri = None,
  extra_params = None 
) [private]

Definition at line 281 of file auth.py.

def tornado.auth.OAuthMixin._on_access_token (   self,
  callback,
  response 
) [private]

Definition at line 341 of file auth.py.

def tornado.auth.OAuthMixin._on_oauth_get_user (   self,
  access_token,
  callback,
  user 
) [private]

Definition at line 354 of file auth.py.

def tornado.auth.OAuthMixin._on_request_token (   self,
  authorize_url,
  callback_uri,
  response 
) [private]

Definition at line 304 of file auth.py.

def tornado.auth.OAuthMixin.authorize_redirect (   self,
  callback_uri = None,
  extra_params = None,
  http_client = None 
)
Redirects the user to obtain OAuth authorization for this service.

Twitter and FriendFeed both require that you register a Callback
URL with your application. You should call this method to log the
user in, and then call get_authenticated_user() in the handler
you registered as your Callback URL to complete the authorization
process.

This method sets a cookie called _oauth_request_token which is
subsequently used (and cleared) in get_authenticated_user for
security purposes.

Definition at line 215 of file auth.py.

def tornado.auth.OAuthMixin.get_authenticated_user (   self,
  callback,
  http_client = None 
)
Gets the OAuth authorized user and access token on callback.

This method should be called from the handler for your registered
OAuth Callback URL to complete the registration process. We call
callback with the authenticated user, which in addition to standard
attributes like 'name' includes the 'access_key' attribute, which
contains the OAuth access you can use to make authorized requests
to this service on behalf of the user.

Definition at line 248 of file auth.py.


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


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Mon Oct 6 2014 06:58:14