我读的identityserver4 guildence,这里是示例代码API范围和用户要求之间的不同在identityserver4
UserClaims =
{
new UserClaim(JwtClaimTypes.Name),
new UserClaim(JwtClaimTypes.Email)
},
// this API defines two scopes
Scopes =
{
new Scope()
{
Name = "api2.full_access",
DisplayName = "Full access to API 2",
},
new Scope
{
Name = "api2.read_only",
DisplayName = "Read only access to API 2"
}
}
我的问题是 似乎范围来控制哪些客户端可以访问的API资源,并且用户声明控制器上apis的用户权限。让我们来看看“api2.read_only”,这是否意味着这个范围的客户端只能访问apis?但是如果用户具有例如:为特定的api写入权限?我对这两件事感到困惑。 提前感谢您的帮助。