Tag: azure active directory

什么是configuration需要设置为asp.net的核心Web组件缩放?

//Startup.cs 我们为openid connect – Azure AD(授权)添加了configuration,如果只有一个实例正在运行,则下面的代码正在工作。 如果我们缩放为3个实例,那么实例正在按预期运行(dockerized容器),但授权不会发生? services.AddAuthentication( options => { options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultAuthenticateScheme = OpenIdConnectDefaults.AuthenticationScheme; }).AddCookie(options => new CookieAuthenticationOptions { LoginPath = new PathString("/Home/"), ExpireTimeSpan = TimeSpan.FromMinutes(5), SlidingExpiration = false, }).AddOpenIdConnect(options => { options.SignInScheme = "Cookies"; options.ClientId = Configuration["ClientId"]; options.ClientSecret = Configuration["ClientSecret"]; options.Authority = Configuration["AADInstance"] + Configuration["TenantId"]; […]