【问题标题】:authorization code flow without code_challenge_method & code_challenge via spring-security-oauth2-client通过 spring-security-oauth2-client 没有 code_challenge_method 和 code_challenge 的授权代码流
【发布时间】:2021-05-13 23:16:38
【问题描述】:

我们有不支持 PKCE 的身份服务器。不能修改它以包含 PKCE。

我正在尝试使用 spring-security-oauth2-client 、 spring-boot-starter-security 和 webclient 在同一身份服务器上实现授权代码流。生成的授权代码使用 code_challenge_method 和 code_challenge 访问令牌时出错。 春天有什么办法不默认使用PKCE?

我使用的是 Spring Boot 版本 2.3.4.RELEASE

【问题讨论】:

    标签: spring-boot spring-security oauth-2.0 spring-security-oauth2 spring-webclient


    【解决方案1】:

    如果客户端没有配置客户端密码,Spring Security 将只使用 PKCE。

    https://docs.spring.io/spring-security/site/docs/5.4.2/reference/html5/#oauth2Client-auth-code-grant

    【讨论】:

    • 一旦我将 client-authentication-method: none 更新为 client-authentication-method: basic in application.yml 就可以了。谢谢@Martin Theiss
    猜你喜欢
    • 2014-05-10
    • 2022-12-06
    • 1970-01-01
    • 2021-11-21
    • 2013-12-01
    • 2017-02-25
    • 2016-07-25
    • 2023-04-01
    • 2015-05-22
    相关资源
    最近更新 更多