颁发者不匹配:WSO2 IS 和 Spring 启动但配置了相同的 URI
Issuer mismatch : WSO2 IS and Spring Boot but same URI configured
我只是在这里复制WSO2 IS官方教程:https://is.docs.wso2.com/en/5.11.0/develop/spring-boot/
在 Spring 中,我的 OIDC 配置很简单:
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
尽管如此,我仍然收到此错误:
Caused by: java.lang.IllegalStateException: The Issuer
"https://localhost:9443/oauth2/token" provided in the configuration
metadata did not match the requested issuer
"https://localhost:9443/oauth2/oidcdiscovery" at
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[=12=](ClientRegistrations.java:158)
~[spring-security-oauth2-client-5.4.2.jar:5.4.2] at
此外,我的 WSO2 IS 配置正确。只有默认值。如下图所示,身份提供者配置
我该怎么办?
我只是在这里复制WSO2 IS官方教程:https://is.docs.wso2.com/en/5.11.0/develop/spring-boot/
在 Spring 中,我的 OIDC 配置很简单:
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
尽管如此,我仍然收到此错误:
Caused by: java.lang.IllegalStateException: The Issuer "https://localhost:9443/oauth2/token" provided in the configuration metadata did not match the requested issuer "https://localhost:9443/oauth2/oidcdiscovery" at 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[=12=](ClientRegistrations.java:158) ~[spring-security-oauth2-client-5.4.2.jar:5.4.2] at
此外,我的 WSO2 IS 配置正确。只有默认值。如下图所示,身份提供者配置
我该怎么办?