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

能不能在zuul上集成ResourceServer统一控制权限 #20

Open
RayonHart opened this issue Jul 4, 2018 · 0 comments
Open

能不能在zuul上集成ResourceServer统一控制权限 #20

RayonHart opened this issue Jul 4, 2018 · 0 comments

Comments

@RayonHart
Copy link

大神请教一下。这个uaa-zuul的demo是在每个普通微服务上建立ResourceServer来保护api的。 这样子每次创建一个新的微服务都要配置一个ResourceServer的配置,略显的麻烦了。 我想在Zuul网关上统一创建一个ResourceServer来实现权限管理, 然后自个儿实现了一下,在zuul服务中 把SecurityConfig的configure(http)方法里面的http参数这么设置,http.authorizeRequests().antMatchers("/order/user").permitAll().anyRequest().authenticated();
然后通过链接发送http://localhost:xxxx/order/user,结果这个链接并没有被放行,还是需要获取token来得到Authentication 对象,并且在tokenService中找不到对应这个token的Authentication(此时我已经把token以Breaer类型写入到请求头中了,并且在application.yml中配置了auth服务获取userinfo的地址了),这个问题研究了好久了, 一直没有得到解决,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant