diff options
Diffstat (limited to 'keystone/token/controllers.py')
-rw-r--r-- | keystone/token/controllers.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py index d2b7d9fd..91514493 100644 --- a/keystone/token/controllers.py +++ b/keystone/token/controllers.py @@ -4,7 +4,6 @@ from keystone.common import cms from keystone.common import controller from keystone.common import dependency from keystone.common import logging -from keystone.common import utils from keystone.common import wsgi from keystone import config from keystone import exception @@ -91,9 +90,7 @@ class Auth(controller.V2Controller): if tenant_ref: catalog_ref = self.catalog_api.get_catalog( - user_id=user_ref['id'], - tenant_id=tenant_ref['id'], - metadata=metadata_ref) + user_ref['id'], tenant_ref['id'], metadata_ref) else: catalog_ref = {} @@ -217,10 +214,9 @@ class Auth(controller.V2Controller): attribute='password', target='passwordCredentials') password = auth['passwordCredentials']['password'] - max_pw_size = utils.MAX_PASSWORD_LENGTH - if password and len(password) > max_pw_size: - raise exception.ValidationSizeError(attribute='password', - size=max_pw_size) + if password and len(password) > CONF.identity.max_password_length: + raise exception.ValidationSizeError( + attribute='password', size=CONF.identity.max_password_length) if ("userId" not in auth['passwordCredentials'] and "username" not in auth['passwordCredentials']): @@ -457,9 +453,9 @@ class Auth(controller.V2Controller): catalog_ref = None if token_ref.get('tenant'): catalog_ref = self.catalog_api.get_catalog( - user_id=token_ref['user']['id'], - tenant_id=token_ref['tenant']['id'], - metadata=token_ref['metadata']) + token_ref['user']['id'], + token_ref['tenant']['id'], + token_ref['metadata']) return Auth.format_endpoint_list(catalog_ref) |