首页 > 代码库 > api-gateway实践(10)新服务网关-新需求验证(三)api-gateway-engine携带有效token访问SvcApp

api-gateway实践(10)新服务网关-新需求验证(三)api-gateway-engine携带有效token访问SvcApp

环境信息

1、Security-Filter拦截(web.xml)

技术分享

2、Zuul-Filter拦截(web.xml)

 技术分享

3、zuul servlet(web.xml)

技术分享

 4、spring的DispatcherServlet(web.xml)

技术分享

准备工作

1、api-gateway-engine2向SvcApp申请access_token

http://localhost:8080/api-gateway-engine2/index.jsp

{"access_token":"dc125aaa-8715-4cc2-bf60-a4af57925413","token_type":"bearer","refresh_token":"9dfc790c-f586-4f6b-a370-2807eb277e43","expires_in":43199,"scope":"read write"}

http://localhost:8080/SvcApp/oauth/token

access_token2=dc125aaa-8715-4cc2-bf60-a4af57925413

2、api-gateway-engine访问SvcApp地址

 

一、请求上下文

1、Security配置

2、Security匹配的过滤器列表

 

二、请求拦截:Security执行 身份识别设置 和 权限检查

1、身份识别设置

2、权限检查

三、请求处理

 

api-gateway实践(10)新服务网关-新需求验证(三)api-gateway-engine携带有效token访问SvcApp