Identityserver4 protect/access api from/for 外部用户

Identityserver4 protect/access api from/for outside users

我想为外部用户提供 webapi 访问权限(我的意思是,用户不属于我的组织)。此 API 已使用 identityserver4 进行保护。

我们的内部应用程序也使用此 API。外部用户希望从他们的 Angular 应用程序和 .Net windows 应用程序访问此 API(2 个应用程序相同 API)。我如何授予访问权限?

API 资源 --> API示例 API 范围 --> api.read, api.write

请指教一下?

基本上您需要的是一种让外部用户向 IdentityServer 注册他们的“客户端应用程序”并就 scopes/claims 应该出现在 ID/access-token 中的内容达成一致的方法。或者,您必须注册客户并提供登录详细信息。

您可以驱动这个数据库,所以只需在数据库中添加必要的记录即可。这个门户的代码你必须自己做。