java - Spring Cloud Gateway 路由调用问题
问题描述
我正在实现我的应用程序的微服务架构。我在哪里实现 aSpring Cloud Gateway
作为我的 API 网关。
我有一个授权服务,我已经实现了谷歌 OAuth2 登录。它工作正常,执行此操作后我从中获得了一个应用程序令牌。
现在我想从Spring Cloud Gateway
. 我可以访问 API 的打开的 google auth 页面,在下一步中,它会显示如下错误
org.springframework.security.oauth2.core.OAuth2AuthenticationException: [authorization_request_not_found]
at org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter.attemptAuthentication(OAuth2LoginAuthenticationFilter.java:170) ~[spring-security-oauth2-client-5.5.1.jar:5.5.1]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:222) ~[spring-security-web-5.5.1.jar:5.5.1]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.5.1.jar:5.5.1]
网关网址:http://dummy.com:9090/oauth2/authorize/google Gate
服务网址:https://dummy.com:7001/oauth2/authorize/google
我一直被困在这一点上。
https://chirag.com:7001/oauth2/callback/google?state=xxx
我调试了应用程序,发现没有找到会话。
所以任何人都可以告诉我问题是什么,以及我如何在网关中管理它。
感谢您提供任何帮助。
解决方案
推荐阅读
- c++ - 使用 shared_ptr 的引用时的 SIGSEGV
- android - 无法从 Firebase 存储中获取文件的下载网址
- wordpress - 如何在buddypress中阻止用户,使用户无法发送邮件
- node.js - Mongodb在引用数组中插入元素?
- mobile - IBM mobile first 7.1 应用程序中的社交登录或第三方登录
- assembly - 在 mips 中组装
- swift - 如何上传使用 alamofire 转换为 base64 的图像?
- mysql - MySQL 根据多个因素(位置、日期和时间)触发/检查 INSERT
- c# - 使用 Process.Handle 获得的句柄有什么权限?
- python - Python:自动售货机