【发布时间】:2021-09-01 03:56:55
【问题描述】:
我正在使用 Springboot 实现 oauth2 服务器
我有四个微服务
- 销售额(销售额)
- 库存(库存)
- IAM 服务(授权服务器,带有 Oauth2)(http://iam:8089)
- 网关(http://www.gateway.com 上的网关)
所有这些服务都在Spring cloud gateway后面,部署在K8S下,Gateway对外暴露为接口。
现在,如果我尝试使用 oauth2 throught gateway 对用户进行身份验证,如下所示。
第 1 步:
Http 请求 http://www.gateway.com/oauth/authorize
所以在响应头中我越来越喜欢
位置:http://iam:8089/v1/oauth/login(但期望是http://www.gateway.com/oauth/login)
因为那个浏览器 将我重定向到 http://iam:8089/oauth/login
理想情况下,我期望它也通过网关服务路由
http://www.gateway.com/oauth/login
谁能帮我解决这个问题。
谢谢 阿尔佩什
【问题讨论】:
标签: java spring-boot oauth-2.0 spring-cloud-gateway