Remove module-level factory methods in favor of having a factory class-method
on wsgi components themselves. Local options from config are passed to the __init__ method of the component as kwargs.
This commit is contained in:
@@ -134,9 +134,3 @@ class AuthMiddleware(wsgi.Middleware):
|
||||
token = self.db.auth_create_token(ctxt, token_dict)
|
||||
return token, user
|
||||
return None, None
|
||||
|
||||
|
||||
def auth_factory(global_conf, **local_conf):
|
||||
def auth(app):
|
||||
return AuthMiddleware(app)
|
||||
return auth
|
||||
|
||||
Reference in New Issue
Block a user