本文介绍了身份服务器单点注销,也从服务器注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在依赖方中使用的注销代码:
Here is my logout code that I use in relying party:
FederationConfiguration cfg = FederatedAuthentication.FederationConfiguration;
var fam = FederatedAuthentication.WSFederationAuthenticationModule;
fam.SignOut(false);
var signOutRequestMessage = new SignOutRequestMessage(new Uri(fam.Issuer), fam.Realm);
return new RedirectResult(signOutRequestMessage.WriteQueryString());
并从 RP 注销并重定向到身份服务器的注销"页面,但我仍然在身份服务器上保持登录状态,这是预期的行为吗?如何更改此设置以便我也从身份服务器注销?
And get logout from RP and redirected to Identity server "Signed out" page, but I still remain logged in at Identity server, is this expected behaviour? How can I change this so I get logged out from Identity server also?
推荐答案
我修改了 HRDController:
I've modified HRDController:
private ActionResult ShowSignOutPage(string returnUrl)
{
....
FederatedAuthentication.SessionAuthenticationModule.DeleteSessionTokenCookie(); //added this
return View("Signout", realms);
}
这篇关于身份服务器单点注销,也从服务器注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!