62,046
社区成员
发帖
与我相关
我的任务
分享
var user = new ClaimsPrincipal(
new ClaimsIdentity(new[]
{
new Claim(ClaimTypes.Name, “test”),
},
CookieAuthenticationDefaults.AuthenticationScheme));
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, user, new Microsoft.AspNetCore.Authentication.AuthenticationProperties
{
IsPersistent = false,
});
User.FindFirst(ClaimTypes.Name).Value