import sqlahelper
from pyramid_beaker import set_cache_regions_from_settings
-from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPNotFound
from pyramid.renderers import JSONP
# mako for templating
config.include('pyramid_mako')
- # Mozilla Persona as the login verifier. It defines default
- # authentication and authorization policies.
- config.include('pyramid_persona')
-
- # override the authn policy to provide a callback
- secret = settings.get('persona.secret', None)
- authn_policy = AuthTktAuthenticationPolicy(secret, callback=groupfinder, hashalg='sha512')
- config.set_authentication_policy(authn_policy)
-
# for json-encoded responses
config.add_renderer('jsonp', JSONP(param_name='callback'))