simpleauth Package

simpleauth Package

A simple auth handler for Google App Engine supporting OAuth 1.0a, 2.0 and OpenID.

handler Module

exception simpleauth.handler.AuthProviderResponseError[source]

Bases: simpleauth.handler.Error

Error coming from a provider

exception simpleauth.handler.Error[source]

Bases: exceptions.Exception

Base error class for this module

exception simpleauth.handler.InvalidCSRFTokenError[source]

Bases: simpleauth.handler.Error

Currently used only in OAuth 2.0 with CSRF protection enabled

exception simpleauth.handler.InvalidOAuthRequestToken[source]

Bases: simpleauth.handler.Error

OAuth1 request token -related error

exception simpleauth.handler.InvalidOpenIDUserError[source]

Bases: simpleauth.handler.Error

Error during OpenID auth callback

class simpleauth.handler.SimpleAuthHandler[source]

Bases: object

A mixin to be used with a real request handler, e.g. webapp2.RequestHandler. See README for getting started and a usage example, or look through the code. It really is simple.

See README for docs on authentication flows.

OAUTH2_CSRF_DELIMITER = ':'
OAUTH2_CSRF_SESSION_PARAM = 'oauth2_state'
OAUTH2_CSRF_STATE = False
OAUTH2_CSRF_TOKEN_TIMEOUT = 3600
PROVIDERS = {'windows_live': ('oauth2', 'https://login.live.com/oauth20_authorize.srf?{0}', 'https://login.live.com/oauth20_token.srf'), 'openid': ('openid', None), 'google': ('oauth2', 'https://accounts.google.com/o/oauth2/auth?{0}', 'https://accounts.google.com/o/oauth2/token'), 'twitter': ('oauth1', {'request': 'https://api.twitter.com/oauth/request_token', 'auth': 'https://api.twitter.com/oauth/authenticate?{0}'}, 'https://api.twitter.com/oauth/access_token'), 'linkedin': ('oauth2', 'https://www.linkedin.com/uas/oauth2/authorization?{0}', 'https://www.linkedin.com/uas/oauth2/accessToken'), 'foursquare': ('oauth2', 'https://foursquare.com/oauth2/authenticate?{0}', 'https://foursquare.com/oauth2/access_token'), 'facebook': ('oauth2', 'https://www.facebook.com/dialog/oauth?{0}', 'https://graph.facebook.com/oauth/access_token')}
TOKEN_RESPONSE_PARSERS = {'windows_live': '_json_parser', 'google': '_json_parser', 'twitter': '_query_string_parser', 'linkedin': '_json_parser', 'foursquare': '_json_parser', 'facebook': '_query_string_parser'}
exception simpleauth.handler.UnknownAuthMethodError[source]

Bases: simpleauth.handler.Error

Raised when there’s no method to call for a specific auth type

Table Of Contents

Previous topic

secrets-new Module

Next topic

task_handler Module

This Page