We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我使用最新版的go-zero开发了go微服务,服务如下: account-api admin-api
go-oauth2是集成在account-api端的,按照官方的文档已经成功集成,现在的问题是, 在前端(vue开发的前端)访问account-api/account/info接口
这个接口使用下面的代码验证前端携带的token,可以正常验证并通过
token, err := svcCtx.Oauth2Res.CheckToken(w, r) if err != nil { return }
CheckToken的封装是根据https://github.com/llaoj/oauth2nsso/blob/master/main.go#L273C8-L273C8进行的
现在在前端使用同样的请求头请求admin-api/system/info接口,接口使用同样的代码
报invalid access token错误
如何解决跨服务验证token,还请指点
The text was updated successfully, but these errors were encountered:
把oauth当请求服务。然后所有的都走api中间件验证就可以了
Sorry, something went wrong.
No branches or pull requests
我使用最新版的go-zero开发了go微服务,服务如下:
account-api
admin-api
go-oauth2是集成在account-api端的,按照官方的文档已经成功集成,现在的问题是,
在前端(vue开发的前端)访问account-api/account/info接口
这个接口使用下面的代码验证前端携带的token,可以正常验证并通过
CheckToken的封装是根据https://github.com/llaoj/oauth2nsso/blob/master/main.go#L273C8-L273C8进行的
现在在前端使用同样的请求头请求admin-api/system/info接口,接口使用同样的代码
报invalid access token错误
如何解决跨服务验证token,还请指点
The text was updated successfully, but these errors were encountered: