在.NET 8/9中的OAuth2.0 Cookie认证
Web applications and APIs that would rather utilize server-side session management than frontend OAuth token disclosure, opt for Cookie Authentication. Cookie Authentication A method in an...
Cookie认证是一种在OAuth系统中保持用户登录状态的方法,ASP.NET Core通过CookieAuthenticationDefaults类配置此认证。在成功的OAuth认证后,使用OnCreatingTicket事件保存身份声明,并通过HttpContext.User属性访问用户数据,从而管理用户访问权限。
