且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Azure应用服务|将应用程序目标部署到同一应用程序服务中的.NET Framework和.NET Core

更新时间:2023-11-22 16:57:22

对上述信息的更新.据我了解,即使Easy Auth对用户进行身份验证,它也没有为ASP.NET Core设置ClaimsPrincipal.Current.我们必须在控制器或中间件的ASP.NET核心中手动进行此操作

an Update to above information. From what I understand, even though Easy Auth authenticates users, it does not set ClaimsPrincipal.Current for ASP.NET core. We have to do it manually in ASP.NET core either in controller or middleware

我下载了zip 来自https://www.benday.com/2018/05/21/walkthrough-part-5-asp-net-core-claims-based-security-using-azure-app-authentication-the-auth-me-服务端点/

I downloaded zip  from https://www.benday.com/2018/05/21/walkthrough-part-5-asp-net-core-claims-based-security-using-azure-app-authentication-the-auth-me-service-endpoint/ 

并更新了安全控制器和PopulateMiddleware,以包含以下代码

and updated security controller and PopulateMiddleware to include following code 

但是,未为应用程序设置用户上下文.有人可以帮忙吗?

However, user context is not set for application. Can you anybody please help? 

此致

RK