Identifier plugin for repoze.who with beaker.session cache implementation
Project description
repoze.who-use_beaker is a repoze.who identifier plugin. It is aimed at replacing repoze.who.plugins.auth_tkt in order to store the user data in beaker session. Currently the only bit it stores is the userid under key repoze.who.tkt.
In order to properly use the beaker.session repoze.who (with repoze.who-use_beaker) has to be placed lower in the WSGI stack. Usually this means that you have to define repoze.who in your framework’s middleware configuration higher than beaker session. E.g. (using the factory from repoze.what-quickstart):
>>> from beaker.middleware import SessionMiddleware >>> from repoze.what.plugins.quickstart import setup_sql_auth >>> from repoze.who.plugins import make_plugin as make_beaker_plugin ... # app definition here >>> app = setup_sql_auth(app, ... User, Group, Permission, DBSession, ... # HERE we provide the beaker plugin to be used as the primary identifier ... identifiers=[('use_beaker', make_beaker_plugin())], ... form_plugin=... # The rest of repoze configuration ... # more middlewares here >>> app = SessionMiddleware(app, config)
Mercurial repository is located at bitbucket.org.