Windows 10,.NET核心3.0 我有一个空的mvc项目(Dotnet new mvc)。首页索引: public async Task<IActionResult> Index() if(User.Identity.Name == null) {CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity), props);
return
我试图在我的Api控制器测试中模拟User.Identity。这是我的api方法: public HttpResponseMessage GetCustomerManagers([FromUri]int groupId = -1) var user = User.Identity.Name;
if (IsStaff(user) &&m_contr