ant-design-pro-blazor icon indicating copy to clipboard operation
ant-design-pro-blazor copied to clipboard

能否提供一个登陆的参考,wasm前端有拦截器吗,http401

Open icetech233 opened this issue 1 year ago • 8 comments

能否提供一个登陆的参考,wasm前端有拦截器吗,

是否能拦截所有请求,比如最常见的 (jwt bearer ) 后端 http401,自动跳转到登录页面

icetech233 avatar Apr 09 '24 08:04 icetech233

Thanks for contacting us @icetech233 , you can try to use DelegatingHandler and NavigationManager.

ElderJames avatar Apr 10 '24 01:04 ElderJames

Thanks for contacting us @icetech233 , you can try to use DelegatingHandler and NavigationManager.

这个是什么,我指的是自动跳转登陆login页面

icetech233 avatar Apr 15 '24 01:04 icetech233

只能自己手写,他没写这个

FronNian avatar Aug 23 '24 01:08 FronNian

Thanks for contacting us @icetech233 , you can try to use DelegatingHandler and NavigationManager.

这个是什么,我指的是自动跳转登陆login页面

他说的是路由跳转,重定向页面

FronNian avatar Aug 23 '24 01:08 FronNian

@JeromyCrother Could you please help add this feature? Using DelegatingHandler to intercept the status code and then show the error message or navigte to Login page.

ElderJames avatar Aug 23 '24 01:08 ElderJames

DelegatingHandler

DelegatingHandler 这个会编译报错

icetech233 avatar Sep 02 '24 08:09 icetech233

@icetech233 这有个待合并的分支,可以先看看https://github.com/ant-design-blazor/ant-design-pro-blazor/tree/feat/http-handler

ElderJames avatar Sep 02 '24 08:09 ElderJames

@icetech233 这有个待合并的分支,可以先看看https://github.com/ant-design-blazor/ant-design-pro-blazor/tree/feat/http-handler

是前端 统一登录 统一鉴权吗? 过期自动首页吗

icetech233 avatar Sep 12 '24 01:09 icetech233