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.

Change-Id: I98bfcec13eba314504c81c45f927cee36f0d5234
Closes-Bug: 1608815
  • Loading branch information
Deepinder Setia committed Aug 2, 2016
1 parent 6b0ad8a commit fa9077d
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 @@ -224,7 +224,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 @@ -233,6 +237,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 fa9077d

Please sign in to comment.