Merge "Allow compatibility with keystonemiddleware 4.0.0"
This commit is contained in:
commit
84f032cccc
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue