【问题标题】:How to logout specific user? IdentityServer4如何注销特定用户?身份服务器4
【发布时间】:2022-01-01 06:37:47
【问题描述】:

我正在尝试创建管理员可以在系统中停用用户的功能。我知道HttpContext.SignOutAsync();await HttpContext.SignOutAsync(IdentityServerConstants.DefaultCookieAuthenticationScheme); 可以指定当前用户,但我如何通过他们的id/用户名等为特定用户执行此操作。

【问题讨论】:

    标签: .net asp.net-core identityserver4 logout


    【解决方案1】:

    是的,但是您确实需要以某种方式将他们的会话存储在后端。 CookieAuthenticationOptions.SessionStoreITicketStore 类型)是允许您将后端持久性添加到 cookie 中间件的扩展点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-28
      • 1970-01-01
      • 2016-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      相关资源
      最近更新 更多