summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-14 22:05:30 +0000
committerGerrit Code Review <review@openstack.org>2016-09-14 22:05:30 +0000
commit84f032cccc45e0f4ac26b0a517a0b28d4e7fd09b (patch)
treec8589960065d0dc326292720bad1130b80cd2a4c
parent9640f509974fbc86c344437b6640b437cf2ab685 (diff)
parent9bbb0ce7a83e4af9f4ef04a35e6779dffaeb7e15 (diff)
downloadkeystone-84f032cccc45e0f4ac26b0a517a0b28d4e7fd09b.tar.gz
Merge "Allow compatibility with keystonemiddleware 4.0.0"
-rw-r--r--keystone/middleware/auth.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/keystone/middleware/auth.py b/keystone/middleware/auth.py
index 9c03c4a83..96c5b124a 100644
--- a/keystone/middleware/auth.py
+++ b/keystone/middleware/auth.py
@@ -11,6 +11,15 @@
# under the License.
from keystonemiddleware import auth_token
+
+# TODO(stevemar): Remove this check once global-requirements depends on a
+# version of keystonemiddleware greater than 4.2.0. We caught this issue too
+# late in the Newton development cycle to unfreeze global requirements.
+try:
+ BaseAuthProtocol = auth_token.BaseAuthProtocol
+except AttributeError:
+ BaseAuthProtocol = auth_token._BaseAuthProtocol
+
from oslo_log import log
from oslo_log import versionutils
@@ -35,7 +44,7 @@ __all__ = ('AuthContextMiddleware',)
@dependency.requires('token_provider_api')
-class AuthContextMiddleware(auth_token.BaseAuthProtocol):
+class AuthContextMiddleware(BaseAuthProtocol):
"""Build the authentication context from the request auth token."""
def __init__(self, app):