frontend_handler Module

Base classes for frontend request handlers.

class frontend_handler.FrontendHandler(request, response)[source]

Bases: webapp2.RequestHandler

Session handler for all user-facing frontend endpoints. Base handler for frontend handlers that need sessions.


Derived from simpleauth/examples/ and subject to the MIT License.

Some parts of SessionHandler adapted from webapp2_extras.auth and subject to the Apache License (see LICENSE file).

SESSION_ATTRIBUTES = ['user_id', 'token_str', 'cache_ts', 'daemon']

Fetch the User object associated with the logged in user.


Returns true if a user is currently logged in, false otherwise.


Retrieves the user id, possibly retrieving the user.

If the cache time has not expired, this function does not retrieve the user object, but merely confirms that the user is considered logged in with the specified id. If the cache time has expired, then the token will be validated and, if valid, the user and validated token will be returned and stored.

If the user object is required, use get_user.

Previous topic

event_server_test Module

Next topic

frontend_handler_test Module

This Page