s/image/heat in auth code.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
d94b53c312
commit
bf651f4207
@ -151,7 +151,7 @@ class KeystoneStrategy(BaseStrategy):
|
||||
resp, resp_body = self._do_request(token_url, 'GET', headers=headers)
|
||||
|
||||
def _management_url(self, resp):
|
||||
for url_header in ('x-image-management-url',
|
||||
for url_header in ('x-heat-management-url',
|
||||
'x-server-management-url',
|
||||
'x-heat'):
|
||||
try:
|
||||
@ -184,7 +184,7 @@ class KeystoneStrategy(BaseStrategy):
|
||||
|
||||
We search the full service catalog for services
|
||||
matching both type and region. If the client
|
||||
supplied no region then any 'image' endpoint
|
||||
supplied no region then any 'heat' endpoint
|
||||
is considered a match. There must be one -- and
|
||||
only one -- successful match in the catalog,
|
||||
otherwise we will raise an exception.
|
||||
@ -200,7 +200,7 @@ class KeystoneStrategy(BaseStrategy):
|
||||
logger.warn(msg)
|
||||
continue
|
||||
|
||||
if service_type == 'image':
|
||||
if service_type == 'heat':
|
||||
for ep in service['endpoints']:
|
||||
if region is None or region == ep['region']:
|
||||
if endpoint is not None:
|
||||
|
@ -93,8 +93,7 @@ class ContextMiddleware(wsgi.Middleware):
|
||||
tokenauth middleware would have rejected the request, so we must be
|
||||
using NoAuth. In that case, assume that is_admin=True.
|
||||
"""
|
||||
auth_tok = req.headers.get('X-Auth-Token',
|
||||
req.headers.get('X-Storage-Token'))
|
||||
auth_tok = req.headers.get('X-Auth-Token')
|
||||
if auth_tok:
|
||||
if req.headers.get('X-Identity-Status') == 'Confirmed':
|
||||
# 1. Auth-token is passed, check other headers
|
||||
|
Loading…
Reference in New Issue
Block a user