Use v2.0 api by default in auth_token middleware

Fixes an issue that crept in with d782a99 where auth_token
started defaulting to the v3.0 API by default when no version
was specified.

Given that bin/keystone still defaults to using the v2.0 API
it seems like auth_token.py should too.

Fixes LP Bug #1154144

Change-Id: Ia5620bccc182bbc73cb60dcccb1f701304450e5a
This commit is contained in:
Dan Prince
2013-03-12 11:24:35 -04:00
parent d782a99847
commit 692d97b85a
2 changed files with 3 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ opts = [
]
CONF.register_opts(opts, group='keystone_authtoken')
LIST_OF_VERSIONS_TO_ATTEMPT = ['v3.0', 'v2.0']
LIST_OF_VERSIONS_TO_ATTEMPT = ['v2.0', 'v3.0']
def will_expire_soon(expiry):

View File

@@ -1323,6 +1323,7 @@ class v3AuthTokenMiddlewareTest(AuthTokenMiddlewareTest):
'revoked_token_hash': REVOKED_v3_TOKEN_HASH
}
super(v3AuthTokenMiddlewareTest, self).setUp(
auth_version='v3.0',
fake_app=v3FakeApp,
fake_http=v3FakeHTTPConnection,
token_dict=token_dict,
@@ -1355,7 +1356,7 @@ class v3AuthTokenMiddlewareTest(AuthTokenMiddlewareTest):
v3FakeHTTPConnection.last_requested_url)
def test_domain_scoped_uuid_request(self):
# Modify items comapred to default token for a domain scope
# Modify items compared to default token for a domain scope
delta_expected_env = {
'HTTP_X_DOMAIN_ID': 'domain_id1',
'HTTP_X_DOMAIN_NAME': 'domain_name1',