Switch to keystonemiddleware

Change-Id: I92a6b8f79a503896e34f1915b6fb32916b642e6f
This commit is contained in:
Davanum Srinivas 2014-12-01 12:14:46 -05:00
parent 65a2af30db
commit aba1d2bf99
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@
import re
from keystoneclient.middleware import auth_token
from keystonemiddleware import auth_token
from oslo.config import cfg
from oslo.utils import importutils
from pecan import hooks
@ -38,7 +38,6 @@ AUTH_OPTS = [
CONF = cfg.CONF
CONF.register_opts(AUTH_OPTS)
CONF.register_opts(auth_token.opts, group=OPT_GROUP_NAME)
PUBLIC_ENDPOINTS = [
]
@ -79,7 +78,7 @@ class AuthProtocolWrapper(auth_token.AuthProtocol):
def __call__(self, env, start_response):
path = env.get('PATH_INFO')
if AUTH.is_endpoint_public(path):
return self.app(env, start_response)
return self._app(env, start_response)
return super(AuthProtocolWrapper, self).__call__(env, start_response)
@ -117,7 +116,7 @@ class AuthInformationHook(hooks.PecanHook):
raise Exception('Not authorized')
auth_url = headers.get('X-Auth-Url')
if auth_url is None:
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
auth_url = cfg.CONF.keystone_authtoken.auth_uri
auth_token_info = state.request.environ.get('keystone.token_info')

View File

@ -11,6 +11,7 @@ oslo.messaging>=1.4.0
oslo.serialization>=1.0.0
oslo.utils>=1.0.0
pecan>=0.8.0
keystonemiddleware>=1.0.0
python-keystoneclient>=0.11.1
python-zaqarclient>=0.0.3
six>=1.7.0