当identityserver重新启动时再次请求声明

时间:2018-06-07 18:45:34

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

我刚刚回购后克隆了identityserver。

https://github.com/IdentityServer/IdentityServer4

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

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

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

那么除了这个TestUserStore.cs方法更改从数据库而不是用户存储中引入数据之外还需要做多少工作?

1 个答案:

答案 0 :(得分:0)

我以为一切都存储在令牌中。但补助金也需要坚持下去。我通过以下文章得到了它。

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