Questions on token.
no-serve-people opened this issue · comments
不为人民服务 commented
有很多场景。是同一个接口,登陆后会获取用户态相关信息,未登录时这些信息是空,目前我们的路由机制无法实现
MaxToby commented
这个只能自行实现一个authhandler,具体参考/rest/handler/authhandler.go
wavechao commented
这个只能自行实现一个authhandler,具体参考/rest/handler/authhandler.go
修改JWT鉴权失败返回格式是不是也要自己实现这个去处理
不为人民服务 commented
这就恶心了啊
wavechao commented
这个只能自行实现一个authhandler,具体参考/rest/handler/authhandler.go
修改JWT鉴权失败返回格式是不是也要自己实现这个去处理
原来这样子处理就好了
engine := rest.MustNewServer(c.RestConf,rest.WithUnauthorizedCallback(func(w http.ResponseWriter, r *http.Request, err error) {
// your custom callback function
}))
an commented
登录态统一在业务网关中处理好,通过上下文传递到业务服务
github-actions commented
This issue is stale because it has been open for 30 days with no activity.
github-actions commented
This issue was closed because it has been inactive for 14 days since being marked as stale.