代码之家  ›  专栏  ›  技术社区  ›  Hantsy

Spring Security 5 OAuth2客户端与基于传统Spring Seucrity OAuth的AuthorizationServer协同工作

  •  1
  • Hantsy  · 技术社区  · 8 年前

    目前是Spring Security 5.0。x仅包括新的OAuth2客户机,OAuth授权服务器和资源服务器将在下一版本中计划。

    我尝试使用遗留的Spring Security OAuth 2.3来提供授权服务器。

    我发现这里有一个已经存在的项目。

    https://github.com/spring-tips/spring-security-5-oauth-client

    但我试着升级 auth-service 到Spring boot 2.0,并使用最新版本 spring-security-oauth2-autoconfigure 在Spring Boot 2.0中处理自动配置。

    当我在本地系统中运行这两个应用程序时,当它返回客户端应用程序时,出现如下错误。

    Your login attempt was not successful, try again.
    
    Reason: [authorization_request_not_found]
    Login with OAuth 2.0
    Login Client
    

    我已经完成了这个项目,并将我的更改提交给:

    https://github.com/hantsy/spring-security-5-oauth-client

    还就上游项目的问题展开了讨论。

    https://github.com/spring-tips/spring-security-5-oauth-client/issues/5

    使现代化 :在我研究了 https://github.com/spring-guides/tut-spring-security-and-angular-js ,如果身份验证服务器和客户端(sso)使用相同的主机和上下文路径,cookie将出现问题。我补充道 /uaa 作为身份验证服务器中的上下文路径,它可以正常工作。

    0 回复  |  直到 7 年前
    推荐文章