1. 用户登录时,将用户的权限写入Cookie: //将需要的信息写入claims后 var identity = new ClaimsIdentity(claims, IdentityConstants.ApplicationScheme); var userPrincipal = new ClaimsPrincipal(identity); await HttpContext.SignInAsync(IdentityConstants.ApplicationScheme, userPrinc…