diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-07-17 05:01:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-07-17 05:01:59 +0000 |
commit | f6d929db964695a721461ba1116770092a7ba36d (patch) | |
tree | 968e2e69de775e589272116f70a81ecb11244340 | |
parent | b5384074dcc6229c2c23bd5edd2981d71607fe3a (diff) | |
parent | 71edac1585fd3cf6333e8f642339ce63784d4f53 (diff) | |
download | keystone-f6d929db964695a721461ba1116770092a7ba36d.tar.gz keystone-f6d929db964695a721461ba1116770092a7ba36d.tar.xz keystone-f6d929db964695a721461ba1116770092a7ba36d.zip |
Merge "Fix XML rendering with empty auth payload."
-rw-r--r-- | keystone/auth/controllers.py | 2 | ||||
-rw-r--r-- | keystone/common/serializer.py | 3 | ||||
-rw-r--r-- | keystone/token/controllers.py | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py index cc4c1605..c4ca3f6f 100644 --- a/keystone/auth/controllers.py +++ b/keystone/auth/controllers.py @@ -225,7 +225,7 @@ class AuthInfo(object): :returns: list of auth method names """ - return self.auth['identity']['methods'] + return self.auth['identity']['methods'] or [] def get_method_data(self, method): """Get the auth method payload. diff --git a/keystone/common/serializer.py b/keystone/common/serializer.py index 597fbfd8..4355a059 100644 --- a/keystone/common/serializer.py +++ b/keystone/common/serializer.py @@ -125,7 +125,8 @@ class XmlDeserializer(object): values = values or text or {} decoded_tag = XmlDeserializer._tag_name(element.tag, namespace) list_item_tag = None - if decoded_tag[-1] == 's' and len(values) == 0: + if (decoded_tag[-1] == 's' and len(values) == 0 and + decoded_tag != 'access'): # FIXME(gyee): special-case lists for now unti we # figure out how to properly handle them. # If any key ends with an 's', we are assuming it is a list. diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py index 4914d305..7a5b9be3 100644 --- a/keystone/token/controllers.py +++ b/keystone/token/controllers.py @@ -262,6 +262,11 @@ class Auth(controller.V2Controller): if 'REMOTE_USER' not in context: raise ExternalAuthNotApplicable() + #NOTE(jamielennox): xml and json differ and get confused about what + # empty auth should look like so just reset it. + if not auth: + auth = {} + username = context['REMOTE_USER'] try: user_ref = self.identity_api.get_user_by_name( |