Skip to content

Commit

Permalink
Change invocation of call to keystone middleware for token validation
Browse files Browse the repository at this point in the history
that meets Mitaka expectations.

Closes-Bug: 1608815

Change-Id: I69c69c0c9a88cb27e818bdae59289ea24d8ac7bf
  • Loading branch information
Deepinder Setia committed Aug 29, 2016
1 parent 0cceea1 commit 084b322
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/config/api-server/vnc_auth_keystone.py
Expand Up @@ -225,7 +225,11 @@ def verify_signed_token(self, user_token):
def token_valid(self, env, start_response):
status = env.get('HTTP_X_IDENTITY_STATUS')
token_info = env.get('keystone.token_info')
return token_info if status != 'Invalid' else None
start_response('200 OK', [('Content-type', 'text/plain')])
return token_info if status != 'Invalid' else ''

def start_response(self, status, headers):
pass

def validate_user_token(self, request):
# following config forces keystone middleware to always return the result
Expand All @@ -234,6 +238,6 @@ def validate_user_token(self, request):
conf_info['delay_auth_decision'] = True

auth_middleware = auth_token.AuthProtocol(self.token_valid, conf_info)
return auth_middleware(request.headers.environ, None)
return auth_middleware(request.headers.environ, self.start_response)

# end class AuthService

0 comments on commit 084b322

Please sign in to comment.