首页 > 解决方案 > 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

我调试了应用程序,发现没有找到会话。

所以任何人都可以告诉我问题是什么,以及我如何在网关中管理它。

感谢您提供任何帮助。

标签: javaspring-bootmicroservicesspring-cloudspring-cloud-gateway

解决方案


推荐阅读