我正在使用身份服务器 Version="4.0.0" 我想在客户端注销时实现所有客户端的注销。我正在尝试 backoutchannel 注销
例如: - 我有以下应用程序 URL 连接到 IS。当客户端 MVC1 从 URL https://localhost:5002/ 注销时,其他客户端也应该注销。我查看了他们所说的 IS 文档以添加 backoutchannelURL
IS--> accountController
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Logout(LogoutInputModel model)
{
// build a model so the logged out page knows what to display
var vm = await BuildLoggedOutViewModelAsync(model.LogoutId);
if (User?.Identity.IsAuthenticated == true)
{
// delete local authentication cookie
await HttpContext.SignOutAsync();
// raise the logout event
await _events.RaiseAsync(new UserLogoutSuccessEvent(User.GetSubjectId(), User.GetDisplayName()));
}
// check if we need to trigger sign-out at an upstream identity provider
if (vm.TriggerExternalSignout)
{
// build a return URL so the upstream provider will redirect back
// to us after the user has logged out. this allows us to then
// complete our single sign-out processing.
string url = Url.Action("Logout", new { logoutId = vm.LogoutId });
// this triggers a redirect to the external provider for sign-out
return SignOut(new AuthenticationProperties { RedirectUri = url }, vm.ExternalAuthenticationScheme);
}
return View("LoggedOut", vm);
}
MVC 应用程序 --> 主页/注销
[HttpPost("Logout")]
[AllowAnonymous]
public IActionResult BackchannelLogout()
{
return SignOut("Cookies", "oidc");
}
知道为什么它不起作用吗?