'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.
:param 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'

def process_request(self, req):

    if (req.headers.get('X-Identity-Status') == 'Confirmed'):
        req.context = self._get_authenticated_context(req)
    elif CONF.allow_anonymous_access:
        req.context = self._get_anonymous_context()
    else:
        raise webob.exc.HTTPUnauthorized()
