Get scope token of current project when switch Keystone Provider
Closes-Bug: #1806621 Change-Id: Ice5b56777967566770454bfbd6800bf3b8c57a37
This commit is contained in:
parent
fb1a129ee2
commit
f8eb17c59b
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user