glance.api.middleware.context module¶
- class glance.api.middleware.context.ContextMiddleware(app)[source]¶
Bases:
glance.api.middleware.context.BaseContextMiddleware
- process_request(req)[source]¶
Convert authentication information into a request context
Generate a glance.context.RequestContext object from the available authentication headers and store on the ‘context’ attribute of the req object.
- Parameters
req – wsgi request object that will be given the context object
- Raises
webob.exc.HTTPUnauthorized – when value of the X-Identity-Status header is not ‘Confirmed’ and anonymous access is disallowed