Furion icon indicating copy to clipboard operation
Furion copied to clipboard

Furion documentation - auth-control

Open monksoul opened this issue 4 years ago • 16 comments

monksoul avatar Dec 16 '21 09:12 monksoul

不是很清楚如何在登录的时候使用,以及实现cookice+jwt两者满足其一的认证模式

18672794706 avatar Dec 21 '21 08:12 18672794706

第三方授权自定义 else context.Fail(); 这是能返回自定义状态码吗 throw Oops.Oh(1000).StatusCode(400); // 设置错误码 返回的状态码直接500了

pridejoy avatar Dec 24 '21 01:12 pridejoy

在mvc下,尝试cookice+jwt总是不成功,文档说默认是Cookie ,结果显示如下错误:No authenticationScheme was specified, and there was no DefaultSignInScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions).请教楼主该如何处理?

shineleo avatar Dec 29 '21 11:12 shineleo

在mvc下,尝试cookice+jwt总是不成功,文档说默认是Cookie ,结果显示如下错误:No authenticationScheme was specified, and there was no DefaultSignInScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action configureOptions).请教楼主该如何处理?

image

monksoul avatar Dec 30 '21 01:12 monksoul

针对某个具体接口的用户授权,有什么推荐的方案

kinglinggo avatar Jan 04 '22 01:01 kinglinggo

针对某个具体接口的用户授权,有什么推荐的方案

IActionFilter

pridejoy avatar Jan 04 '22 01:01 pridejoy

一直都是401 啥问题咯

DNLi303 avatar Jan 06 '22 10:01 DNLi303

@DNLi303 一直都是401 啥问题咯 请求头带上生成的token了吗?参考15.5.3

kinglinggo avatar Jan 06 '22 10:01 kinglinggo

混合身份认证下,我在一个action上同时使用了ValidateAntiForgeryToken和Authorize,然后发现ValidateAntiForgeryToken似乎被覆盖了,ajax里header里已经把Authorization和RequestVerificationToken都加上了,单独的都能工作,但一起使用时ValidateAntiForgeryToken就不起作用,请问下这个问题怎么解决的

ntuchenxy avatar Jan 09 '22 16:01 ntuchenxy

请问前端获取不到响应头中的token怎么办

HelloHsx avatar Jan 17 '22 03:01 HelloHsx

@HelloHsx 请问前端获取不到响应头中的token怎么办

存在但是前端取不到。可以参考下跨域的允许请求头配置 https://dotnetchina.gitee.io/furion/docs/cors#166-%E4%BD%BF%E7%94%A8-axios-%E5%89%8D%E7%AB%AF%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9

kinglinggo avatar Jan 17 '22 03:01 kinglinggo

@kinglinglive

@HelloHsx 请问前端获取不到响应头中的token怎么办

存在但是前端取不到。可以参考下跨域的允许请求头配置 https://dotnetchina.gitee.io/furion/docs/cors#166-%E4%BD%BF%E7%94%A8-axios-%E5%89%8D%E7%AB%AF%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9

非常感谢!!

HelloHsx avatar Jan 17 '22 03:01 HelloHsx

携带了Authorization头后依旧报401...咋办

MasterYuan418 avatar Mar 24 '22 07:03 MasterYuan418

JWT认证下 我用了Sentry错误跟踪 会有报错 “No authenticationScheme was specified, and there was no DefaultSignInScheme found” 本地调式基本没问题,但是发布Linux Debian11时服务器上会有问题 实在是找不到原因 部分配置如下 image

image image image image image

yw1987628 avatar Jun 23 '22 08:06 yw1987628

在使用[Authorize]时,若服务器开启Windows身份验证,每次打开系统都会要求输入账户密码,这个怎么解决啊

Schaffer-W avatar Jul 06 '22 03:07 Schaffer-W

@MasterYuan418 携带了Authorization头后依旧报401...咋办

请求头格式是否这样的:Bearer {token},

Schaffer-W avatar Jul 06 '22 03:07 Schaffer-W