diff --git a/openstack_auth/plugin/k2k.py b/openstack_auth/plugin/k2k.py index 65afd62a8d..345bab60cf 100644 --- a/openstack_auth/plugin/k2k.py +++ b/openstack_auth/plugin/k2k.py @@ -70,7 +70,8 @@ class K2KAuthPlugin(base.BasePlugin): self, unscoped_idp_auth) try: scoped_idp_auth, __ = self.get_project_scoped_auth( - unscoped_idp_auth, unscoped_auth_ref) + unscoped_idp_auth, unscoped_auth_ref, + recent_project=kwargs['recent_project']) except exceptions.KeystoneAuthException as idp_excp: idp_exception = idp_excp diff --git a/openstack_auth/views.py b/openstack_auth/views.py index abd2f40ae7..c6d10ef21d 100644 --- a/openstack_auth/views.py +++ b/openstack_auth/views.py @@ -292,6 +292,7 @@ def switch_keystone_provider(request, keystone_provider=None, base_token = request.session.get('k2k_base_unscoped_token', None) k2k_auth_url = request.session.get('k2k_auth_url', None) keystone_providers = request.session.get('keystone_providers', None) + recent_project = request.COOKIES.get('recent_project') if not base_token or not k2k_auth_url: msg = _('K2K Federation not setup for this session') @@ -316,7 +317,7 @@ def switch_keystone_provider(request, keystone_provider=None, unscoped_auth = current_plugin.get_plugin( auth_url=k2k_auth_url, service_provider=keystone_provider, - plugins=plugins, token=base_token) + plugins=plugins, token=base_token, recent_project=recent_project) try: # Switch to identity provider using token auth