admin管理员组文章数量:1191356
I've checked out Microsofts Secure an ASP.NET Core Blazor Web App with Microsoft Entra ID example / GitHub
In program.cs
authentication is configured as follows.
builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"));
builder.Services.AddAuthorization();
If I log in and click on the weather button a cookie is attached to the request.
I don't understand where that cookie is coming from. I built a blazor web app from scratch with basically the same configuration but I can't get the authentication to work. I can't find any documentation either. How does this example work?
Update: The example is calling the API on HostEnvironment.BaseAddress. In my case I'm calling a WebApi (other project) with another port. What do I need to configure that the cookie is also attached?
本文标签: cSecure an ASPNET Core Blazor Web App with Microsoft Entra IDStack Overflow
版权声明:本文标题:c# - Secure an ASP.NET Core Blazor Web App with Microsoft Entra ID - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738400791a2084767.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论