Spring boot 颁发者不匹配:WSO2与Spring Boot不匹配,但配置了相同的URI
我只是在这里复制WSO2 IS官方教程: 在Spring中,我的OIDC配置很简单:Spring boot 颁发者不匹配:WSO2与Spring Boot不匹配,但配置了相同的URI,spring-boot,wso2,Spring Boot,Wso2,我只是在这里复制WSO2 IS官方教程: 在Spring中,我的OIDC配置很简单: provider: host: https://localhost:9443 #Change the host spring: security: oauth2: client: registration: wso2: client-name : WSO2 Identity Server
provider:
host: https://localhost:9443 #Change the host
spring:
security:
oauth2:
client:
registration:
wso2:
client-name : WSO2 Identity Server
client-id: aXOWlNxT0aKIfKIeH82IfsmLjsYa #Change client-id
client-secret: CVl_vmEYqRuZddBu3ZCYQQwGtYsa # Change client-secret
authorization-grant-type: authorization_code
scope: openid
provider:
wso2:
issuer-uri: ${provider.host}/oauth2/oidcdiscovery
thymeleaf:
cache: false
尽管如此,我仍然得到这个错误:
原因:java.lang.IllegalStateException:发行人
"https://localhost:9443/oauth2/token“在配置中提供
元数据与请求的颁发者不匹配
"https://localhost:9443/oauth2/oidcdiscovery“在
org.springframework.util.Assert.state(Assert.java:97)
~[spring-core-5.3.2.jar:5.3.2]at
org.springframework.security.oauth2.client.registration.ClientRegistrations.withProviderConfiguration(ClientRegistrations.java:239)
~[spring-security-oauth2-client-5.4.2.jar:5.4.2]at
org.springframework.security.oauth2.client.registration.ClientRegistrations.lambda$oidc$0(ClientRegistrations.java:158)
~[spring-security-oauth2-client-5.4.2.jar:5.4.2]at
此外,我的WSO2配置正确。只有默认值。如下面的屏幕截图所示,带有标识提供程序配置
我该怎么办?已报告此问题,并且已为发现请求配置了解决方案
/token
端点。我在谷歌上搜索了,但没有在github结果中查找。谢谢。在回答之前,我通过将身份提供程序实体ID从token更改为oidcdiscovery来修复它,以匹配我的application.yml。现在,我将在两种设置中使用/token。我相信教程也应该更新。谢谢阿努拉达,请投票支持我的问题