This commit is contained in:
Matt Wright
2012-08-17 15:05:22 -04:00
parent 9c189f9083
commit c36fee7fda
5 changed files with 15 additions and 55 deletions
+3 -8
View File
@@ -227,8 +227,7 @@ class _SecurityState(object):
c[endpoint].append(fn)
def _run_ctx_processor(self, endpoint):
fns = []
rv = {}
rv, fns = {}, []
for g in ['all', endpoint]:
if g in self.context_processors:
@@ -324,20 +323,16 @@ class Security(object):
('principal', _get_principal(app)),
('pwd_context', _get_pwd_context(app)),
('remember_token_serializer', _get_remember_token_serializer(app)),
('token_auth_serializer', _get_token_auth_serializer(app))]:
('token_auth_serializer', _get_token_auth_serializer(app)),
('context_processors', {})]:
kwargs[key] = value
kwargs['context_processors'] = {}
kwargs['login_serializer'] = (
_get_login_serializer(app) if kwargs['passwordless'] else None)
kwargs['reset_serializer'] = (
_get_reset_serializer(app) if kwargs['recoverable'] else None)
kwargs['confirm_serializer'] = (
_get_confirm_serializer(app) if kwargs['confirmable'] else None)
return _SecurityState(**kwargs)
def __getattr__(self, name):