.net core cookie的问题

https://img1.mukewang.com/5b7a842f000157db07290741.jpg

[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]

想请教一下如何在不加过滤器的情况下取cookie


慕容708150
浏览 633回答 1
1回答

烙印99

Startup.cs 中添加以下代码了吗?services.AddAuthentication(options => {     options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;     options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; }) .AddCookie();
打开App,查看更多内容
随时随地看视频慕课网APP