https://github.com/kakawait/uaa-behind-zuul-sample/
1.参考资料
项目:https://github.com/kakawait/uaa-behind-zuul-sample/,按照这个项目实现后,虽然会跳转到认证服务的登录页,但登录成功后无法跳转回来,原因是做了二次302,但302的过程中将一些信息丢了,查原因是,主要跟踪了下面的类
预过滤器:
0 = {[email protected]} ,确定是否支持Dispatch请求
1 = {[email protected]} ,进行Servlet30请求包装
2 = {[email protected]} ,FormBody包装
3 = {[email protected]}
4 = {[email protected]}
5 = {[email protected]} ,addIgnoredHeaders不知道是啥意思
6 = {[email protected]} ,这个被跳过了,不知道是否可以直接disable算了
ctx.addZuulRequestHeader("authorization", ctx.get(TOKEN_TYPE) + " " + getAccessToken(ctx));
正式过滤器:
0 = {[email protected]}
1 = {[email protected]}
2 = {[email protected]}
2.zuul中主要的类
2.1 ZuulController
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {}
2.2 RibbonRoutingFilter