【发布时间】:2017-04-23 22:05:31
【问题描述】:
我在 Azure AD 中配置了两个租户。我的用户在我的租户中验证成功,但其他租户的其他用户可以访问我的应用程序。
我的申请有什么问题?我在我的代码中使用 OpenId Connect 协议,例如:
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = authority,
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
ValidateIssuer = false,
},
Notifications = new OpenIdConnectAuthenticationNotifications()
{
SecurityTokenValidated = (context) =>
{
return Task.FromResult(0);
},
AuthenticationFailed = (context) =>
{
context.HandleResponse();
return Task.FromResult(0);
}
}
});
我是否在 Azure 上设置了错误?
有人帮帮我吗?
谢谢,
维莱拉
【问题讨论】:
-
我不清楚您在这里遇到了什么问题。能否请您复制并粘贴您收到的错误消息?
标签: azure authentication c#-4.0 azure-active-directory openid-connect