IdentityServer数据库更改方案

时间:2017-04-20 18:59:33

标签: oauth openid identityserver3 identityserver4

我正在尝试整理一些文档,说明在执行不同操作时需要对数据库后端进行的更改,以便它们可以与IdentityServer4一起运行,但是我意识到我不确定数据库中的哪些项目会受到影响当您执行诸如(添加新用户,添加新客户端和范围等)之类的操作时。我使用它来更好地理解所有元素如何协同工作,以及如何相互关联 - 请参阅下面我需要扩展。 任何对IdentityServer后端有良好经验的人都可以帮助我吗?

[Adding a new user]

- 向dbo.AspNetUsers添加记录 - 所有用户相关信息。 - 向dbo添加记录.AspNetUserClaims - 识别存储的信息,类似于使用指向用户的引用设置的键/值对

[Adding a new Client – (Controller Web API Endpoint)]

- 向dbo.Clients添加记录 - 定义客户端的详细信息 - 向dbo添加记录.ClientGrantTypes - 允许授权给指定客户端的所有授权类型。 - 向dbo.ClientSecrets添加记录 - 与客户端有关的密码和机密信息。 - 向dbo添加记录.ClientScopes - 与ClientId匹配的范围名称允许。您需要为客户端添加范围,以便可以访问它。 - ??不确定如何使用IdentityResoure和IdentityClaims,以及如何使用oidc。

?? Identity Server DB中Api和Client之间有什么区别?

[New Claim type is added, and needs to be included in the data returned with the JWT token]

...

1 个答案:

答案 0 :(得分:0)

使用IdentityServer4.AspNetIdentity使用EF COPY with S3 as a data source

在SQL Server中存储用户

使用IdentityServer4.EntityFramework使用EF在SQL Server中存储客户端和资源配置。 http://docs.identityserver.io/en/release/quickstarts/6_aspnet_identity.html

查看http://docs.identityserver.io/en/release/quickstarts/8_entity_framework.html存储库中的代码示例。