为什么 acr_values 没有传递给 Identity Server 4 上的 POST /connect/token?

Why is acr_values not passed to POST /connect/token on Identity Server 4?

我正在尝试对与现有租户相关的用户进行身份验证。但是 acr_values 没有通过。 image

您可以通过 IResourceOwnerPasswordValidator 实现中的 ResourceOwnerPasswordValidationContext.Request.Raw 属性 访问其他参数。

由于 acr_values 并不真正适用于此授权类型,您最好传递一个名为 tenant 的自定义参数并从 Request.Raw 属性 在验证器中。

我在 header 中添加了 __tenant 并将租户 ID 作为值。