Used auth_token middleware from keystoneclient.

The auth_token middleware was moved from keystone to keystoneclient.

Fixed the bug 1080990.

Change-Id: I424489b73e420546df96a52f639d0ee1c8ee6287
This commit is contained in:
Lianhao Lu 2012-11-20 14:13:12 +08:00
parent a96e1a73cd
commit 1cc462843c
4 changed files with 8 additions and 9 deletions

View File

@ -20,23 +20,23 @@
import flask import flask
from ceilometer import policy from ceilometer import policy
import keystone.middleware.auth_token import keystoneclient.middleware.auth_token as auth_token
def register_opts(conf): def register_opts(conf):
"""Register keystone middleware options """Register keystoneclient middleware options
""" """
conf.register_opts(keystone.middleware.auth_token.opts, conf.register_opts(auth_token.opts,
group='keystone_authtoken', group='keystone_authtoken',
) )
keystone.middleware.auth_token.CONF = conf auth_token.CONF = conf
def install(app, conf): def install(app, conf):
"""Install ACL check on application.""" """Install ACL check on application."""
app.wsgi_app = keystone.middleware.auth_token.AuthProtocol(app.wsgi_app, app.wsgi_app = auth_token.AuthProtocol(app.wsgi_app,
conf=conf, conf=conf,
) )
app.before_request(check) app.before_request(check)
return app return app

View File

@ -13,3 +13,4 @@ Flask==0.9
stevedore>=0.6 stevedore>=0.6
python-glanceclient python-glanceclient
python-novaclient python-novaclient
python-keystoneclient>=0.2,<0.3

View File

@ -13,5 +13,4 @@ mox
https://github.com/dreamhost/Ming/zipball/master#egg=Ming https://github.com/dreamhost/Ming/zipball/master#egg=Ming
http://tarballs.openstack.org/nova/nova-master.tar.gz http://tarballs.openstack.org/nova/nova-master.tar.gz
http://tarballs.openstack.org/glance/glance-master.tar.gz http://tarballs.openstack.org/glance/glance-master.tar.gz
http://tarballs.openstack.org/keystone/keystone-master.tar.gz
setuptools-git>=0.4 setuptools-git>=0.4

View File

@ -13,5 +13,4 @@ mox
# changes to it so it would be compatible with PyMongo's API. # changes to it so it would be compatible with PyMongo's API.
https://github.com/dreamhost/Ming/zipball/master#egg=Ming https://github.com/dreamhost/Ming/zipball/master#egg=Ming
https://github.com/openstack/glance/zipball/2012.2#egg=glance https://github.com/openstack/glance/zipball/2012.2#egg=glance
https://github.com/openstack/keystone/zipball/2012.2#egg=keystone
setuptools-git>=0.4 setuptools-git>=0.4