Skip to content
New issue

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

有没有统一的鉴权拦截器 #4

Closed
tttlkkkl opened this issue Nov 18, 2018 · 1 comment
Closed

有没有统一的鉴权拦截器 #4

tttlkkkl opened this issue Nov 18, 2018 · 1 comment
Assignees
Labels

Comments

@tttlkkkl
Copy link

显然 micro api 入口点的UIR和服务的映射做的很好,但是有没有办法做一个统一的拦截器,实现统一的登录鉴权呢。我测试不管如何 /rpc 方式都能直接访问后端服务, 这意味着我如果要使用 api 入口点的话就需要在每一个能被发现并请求的服务节点添加登录鉴权,重复劳动甚至是重复鉴权。老兄有没有什么好的解决办法。

@hb-chen
Copy link
Owner

hb-chen commented Nov 19, 2018

可以看下micro.WrapHandler,做一个统一的鉴权srv,然后在所有的api服务加这个handler wrap

@hb-chen hb-chen self-assigned this Nov 19, 2018
@hb-chen hb-chen closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants