为了账号安全,请及时绑定邮箱和手机立即绑定

.net core cookie的问题

.net core cookie的问题

慕容708150 2018-08-10 10:14:08
[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]想请教一下如何在不加过滤器的情况下取cookie
查看完整描述

1 回答

?
烙印99

TA贡献1829条经验 获得超13个赞

Startup.cs 中添加以下代码了吗?

services.AddAuthentication(options =>
{
    options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
    options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
.AddCookie();


查看完整回答
反对 回复 2018-08-20
  • 1 回答
  • 0 关注
  • 630 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信