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:
Todd Willey
2011-01-06 13:57:48 -05:00
parent 71d78e1a6f
commit 4e034f3d69
7 changed files with 66 additions and 96 deletions
-6
View File
@@ -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