【发布时间】:2019-09-10 01:46:09
【问题描述】:
我们正在使用 OIDC 库,目前我们只允许 MSA 帐户登录。所以我们已经配置了参数ValidateIssuer = true 和Validissuers = https://login.microsoftonline.com/..” 但是,我们现在需要将其他AAD 租户(例如:abc@dell.com)加入我们的应用程序,所以我们决定设置ValidateIssuer = false。
由于我的应用程序已经由自定义授权备份,我发现很难完全理解此标志的用途。 基本上我的问题是在什么情况下不想将此标志设置为 false ?如果设置为 false 可能会遇到什么风险?
我查看了 here 发布的 AAD 文档,但仍然无法从 cmets 对示例代码 sn-p 找到令人信服的回应:
// ValidateIssuer set to false to allow work accounts from any organization to sign in to your application
// To only allow users from a single organizations, set ValidateIssuer to true and 'tenant' setting in web.config to the tenant name or Id (example: contoso.onmicrosoft.com)
// To allow users from only a list of specific organizations, set ValidateIssuer to true and use ValidIssuers parameter
TokenValidationParameters = new TokenValidationParameters()
{
ValidateIssuer = false
},
【问题讨论】:
标签: c# azure-active-directory openid-connect