Use auth_token from keystonemiddleware
auth_token middleware in python-keystoneclient is deprecated and has been moved to the keystonemiddleware repo. Change-Id: I42ee04171e98518f8728af4996e687b8a46cd27c Closes-Bug: #1342274
This commit is contained in:
parent
0095ff8a2b
commit
6ff0b1512b
@ -582,7 +582,7 @@
|
||||
[keystone_authtoken]
|
||||
|
||||
#
|
||||
# Options defined in keystoneclient.middleware.auth_token
|
||||
# Options defined in keystonemiddleware.auth_token
|
||||
#
|
||||
|
||||
# Prefix to prepend at the beginning of the path. Deprecated,
|
||||
|
@ -4,6 +4,7 @@ eventlet>=0.13.0
|
||||
Flask>=0.10,<1.0
|
||||
iso8601>=0.1.9
|
||||
jsonschema>=2.0.0,<3.0.0
|
||||
keystonemiddleware>=1.0.0
|
||||
lockfile>=0.8
|
||||
oslo.config>=1.4.0.0a3
|
||||
oslo.db>=0.4.0 # Apache-2.0
|
||||
|
@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from keystoneclient.middleware import auth_token
|
||||
from keystonemiddleware import auth_token
|
||||
from oslo.config import cfg
|
||||
|
||||
from sahara.openstack.common import log
|
||||
@ -27,16 +27,6 @@ AUTH_OPT_GROUP_NAME = 'keystone_authtoken'
|
||||
AUTH_URI = None
|
||||
|
||||
|
||||
def register_auth_opts(conf):
|
||||
"""Register keystoneclient auth_token middleware options."""
|
||||
|
||||
conf.register_opts(auth_token.opts, group=AUTH_OPT_GROUP_NAME)
|
||||
auth_token.CONF = conf
|
||||
|
||||
|
||||
register_auth_opts(CONF)
|
||||
|
||||
|
||||
def wrap(app, conf):
|
||||
"""Wrap wsgi application with ACL check."""
|
||||
|
||||
@ -45,6 +35,6 @@ def wrap(app, conf):
|
||||
|
||||
# store auth uri in global var to be able to use it in runtime
|
||||
global AUTH_URI
|
||||
AUTH_URI = auth_protocol.auth_uri
|
||||
AUTH_URI = auth_protocol._identity_server.auth_uri
|
||||
|
||||
return auth_protocol
|
||||
|
@ -1,2 +1,2 @@
|
||||
export SAHARA_CONFIG_GENERATOR_EXTRA_MODULES="keystoneclient.middleware.auth_token"
|
||||
export SAHARA_CONFIG_GENERATOR_EXTRA_MODULES="keystonemiddleware.auth_token"
|
||||
export SAHARA_CONFIG_GENERATOR_EXTRA_LIBRARIES="oslo.db oslo.messaging"
|
||||
|
Loading…
Reference in New Issue
Block a user