【问题标题】:Asks for claims again when identityserver restarts重新启动身份服务器时再次请求声明
【发布时间】:2018-06-10 14:55:59
【问题描述】:

我刚刚在 repo 之后克隆了身份服务器。

https://github.com/IdentityServer/IdentityServer4

我更改了以下类以从数据库而不是内存用户中获取数据,并在新添加时插入。

https://github.com/IdentityServer/IdentityServer4/blob/dev/src/IdentityServer4/Test/TestUserStore.cs

但是当我重新启动 Identityserver 时它会再次要求声明,即使我在重新启动之前已授予声明(并且也存储在数据库中)。但是,如果我不重新启动,那么它会正常工作(如果已授予索赔,则会按预期重定向回我的主页)

那么除了这个 TestUserStore.cs 方法更改以从数据库而不是用户存储中获取数据之外,我还需要做些什么?

【问题讨论】:

    标签: asp.net-identity identityserver4 claims-based-identity


    【解决方案1】:

    我以为一切都存储在令牌中。但授予也需要坚持。我是通过以下文章了解的。

    https://mcguirev10.com/2018/01/02/identityserver4-without-entity-framework.html

    【讨论】:

      猜你喜欢
      • 2021-05-10
      • 2016-04-08
      • 1970-01-01
      • 2019-07-11
      • 2016-09-29
      • 1970-01-01
      • 2017-08-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多