class pybald.core.middleware.sessions.SessionManager(application=None, days=14, session_class=None)

Code to handle anonymous and user sessions, implemented as WSGI middleware.

class pybald.core.middleware.users.UserManager(application=None, user_class=None)

Code to manage users, implemented as WSGI middleware.

This middleware will set REMOTE_USER as well as the pybald context object within the WSGI environ. This allows any other WSGI or pybald aware code to inspect the environ for the current authenticated user.

class pybald.core.middleware.db_middleware.DbMiddleware(application=None)

The database middleware provides three behaviors, committing transactions at the end of the request, rolling back database transactions if errors occur and forcibly closing the session at the end of the web request to avoid dangling connections.

class pybald.core.middleware.db_middleware.EndPybaldMiddleware(application)

Utilitiy middleware to force remove current session at the end of the request.