Public Member Functions | |
def | authenticate_redirect |
def | get_auth_http_client |
def | get_authenticated_user |
Private Member Functions | |
def | _on_authentication_verified |
def | _openid_args |
Abstract implementation of OpenID and Attribute Exchange. See `GoogleMixin` below for a customized example (which also includes OAuth support). Class attributes: * ``_OPENID_ENDPOINT``: the identity provider's URI.
def tornado.auth.OpenIdMixin._on_authentication_verified | ( | self, | |
future, | |||
response | |||
) | [private] |
def tornado.auth.OpenIdMixin._openid_args | ( | self, | |
callback_uri, | |||
ax_attrs = [] , |
|||
oauth_scope = None |
|||
) | [private] |
def tornado.auth.OpenIdMixin.authenticate_redirect | ( | self, | |
callback_uri = None , |
|||
ax_attrs = ["name" , |
|||
email, | |||
language, | |||
username, | |||
callback = None |
|||
) |
Redirects to the authentication URL for this service. After authentication, the service will redirect back to the given callback URI with additional parameters including ``openid.mode``. We request the given attributes for the authenticated user by default (name, email, language, and username). If you don't need all those attributes for your app, you can request fewer with the ax_attrs keyword argument. .. versionchanged:: 3.1 Returns a `.Future` and takes an optional callback. These are not strictly necessary as this method is synchronous, but they are supplied for consistency with `OAuthMixin.authorize_redirect`.
def tornado.auth.OpenIdMixin.get_auth_http_client | ( | self | ) |
def tornado.auth.OpenIdMixin.get_authenticated_user | ( | self, | |
callback, | |||
http_client = None |
|||
) |
Fetches the authenticated user data upon redirect. This method should be called by the handler that receives the redirect from the `authenticate_redirect()` method (which is often the same as the one that calls it; in that case you would call `get_authenticated_user` if the ``openid.mode`` parameter is present and `authenticate_redirect` if it is not). The result of this method will generally be used to set a cookie.