【发布时间】:2021-03-16 02:42:52
【问题描述】:
是否可以在 oauth2 客户端流程中禁用重定向到 oauth2/authorization/{registrationId}? 我在 Spring Cloud Gateway 中有以下 oauth2 流的属性,但我没有指定 url oauth2/authorization/{registrationId}:
security:
oauth2:
client:
registration:
smart_hub_client:
provider: wso2is
client-id: someid
client-secret: somesecret
authorization-grant-type: authorization_code
redirect-uri: "{baseUrl}/redirect_uri"
scope: sso,openid
provider:
wso2is:
authorization-uri: https://authserver/oauth2/authorize?loginPage=login.jsp
token-uri: https://authserver.com/oauth2/token
user-info-uri: https://authserver/oauth2/userinfo
user-name-attribute: sub
jwk-set-uri: https://authserver.com/oauth2/jwks
屏幕截图中的请求 URL 在这里:https://myscgapp/oauth2/authorization/smart_hub_client
更新: 我已将上面的 conf 更新为我的示例。 主要问题 - 我有重定向循环。也许禁用 https://myscgapp/oauth2/authorization/smart_hub_client 可以提供帮助?还是根本原因是另一个?
【问题讨论】:
标签: spring-security oauth-2.0 spring-security-oauth2 spring-cloud-gateway spring-boot-starter-oauth2-client