Merge "check if tokenless auth is configured before validating"

This commit is contained in:
Jenkins 2015-09-18 19:52:29 +00:00 committed by Gerrit Code Review
commit fb9fbbafcd
1 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,9 @@ class AuthContextMiddleware(wsgi.Middleware):
:returns: True if client_issuer is trusted; otherwise False
"""
if not CONF.tokenless_auth.trusted_issuer:
return False
client_issuer = env.get(CONF.tokenless_auth.issuer_attribute)
if not client_issuer:
msg = _LI('Cannot find client issuer in env by the '