summaryrefslogtreecommitdiffstats
path: root/keystone/auth
diff options
context:
space:
mode:
authorFabio Giannetti <fabio.giannetti@hp.com>2013-06-15 22:29:21 -0700
committerJamie Lennox <jamielennox@gmail.com>2013-07-17 15:21:33 +1000
commit53a03b53e7541367c07df6d4f6739173330f5353 (patch)
tree824f746b82e155da13e23b4a3c6425467ce63fa9 /keystone/auth
parentf6d929db964695a721461ba1116770092a7ba36d (diff)
downloadkeystone-53a03b53e7541367c07df6d4f6739173330f5353.tar.gz
keystone-53a03b53e7541367c07df6d4f6739173330f5353.tar.xz
keystone-53a03b53e7541367c07df6d4f6739173330f5353.zip
Implemented token creation without catalog response.
Modified the token_factory to create token responses with or without the catalog entry. blueprint catalog-optional Change-Id: Icdc4400f08f4619a19e44129c78240800a3a1e75
Diffstat (limited to 'keystone/auth')
-rw-r--r--keystone/auth/controllers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py
index c4ca3f6f..6937c44d 100644
--- a/keystone/auth/controllers.py
+++ b/keystone/auth/controllers.py
@@ -279,6 +279,8 @@ class Auth(controller.V3Controller):
def authenticate_for_token(self, context, auth=None):
"""Authenticate user and issue a token."""
+ include_catalog = 'nocatalog' not in context['query_string']
+
try:
auth_info = AuthInfo(context, auth=auth)
auth_context = {'extras': {}, 'method_names': []}
@@ -289,6 +291,7 @@ class Auth(controller.V3Controller):
method_names += auth_context.get('method_names', [])
# make sure the list is unique
method_names = list(set(method_names))
+
(token_id, token_data) = self.token_provider_api.issue_token(
user_id=auth_context['user_id'],
method_names=method_names,
@@ -296,7 +299,8 @@ class Auth(controller.V3Controller):
project_id=project_id,
domain_id=domain_id,
auth_context=auth_context,
- trust=trust)
+ trust=trust,
+ include_catalog=include_catalog)
return render_token_data_response(token_id, token_data,
created=True)
except exception.TrustNotFound as e: