Revert "Expose property to configure OAuth2 provider configurationMetadata"
This reverts commit 7b79029949.
See gh-21375
This commit is contained in:
parent
daed512076
commit
27ada029b5
|
|
@ -17,7 +17,6 @@
|
|||
package org.springframework.boot.autoconfigure.security.oauth2.client;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
@ -220,11 +219,6 @@ public class OAuth2ClientProperties {
|
|||
*/
|
||||
private String issuerUri;
|
||||
|
||||
/**
|
||||
* Additional metadata describing the provider's configuration.
|
||||
*/
|
||||
private Map<String, Object> configurationMetadata = new LinkedHashMap<>();
|
||||
|
||||
public String getAuthorizationUri() {
|
||||
return this.authorizationUri;
|
||||
}
|
||||
|
|
@ -281,10 +275,6 @@ public class OAuth2ClientProperties {
|
|||
this.issuerUri = issuerUri;
|
||||
}
|
||||
|
||||
public Map<String, Object> getConfigurationMetadata() {
|
||||
return this.configurationMetadata;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ public final class OAuth2ClientPropertiesRegistrationAdapter {
|
|||
.to(builder::userInfoAuthenticationMethod);
|
||||
map.from(provider::getJwkSetUri).to(builder::jwkSetUri);
|
||||
map.from(provider::getUserNameAttribute).to(builder::userNameAttributeName);
|
||||
map.from(provider::getConfigurationMetadata).to(builder::providerConfigurationMetadata);
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -238,20 +238,6 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
|
|||
testIssuerConfiguration(login, "okta", 2, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
void configurationMetadataFromProviderIsAdapted() {
|
||||
Provider provider = createProvider();
|
||||
provider.getConfigurationMetadata().put("end_session_endpoint", "https://myendsessionendpoint");
|
||||
OAuth2ClientProperties.Registration registration = createRegistration("my-oauth-provider");
|
||||
OAuth2ClientProperties properties = new OAuth2ClientProperties();
|
||||
properties.getRegistration().put("registration", registration);
|
||||
properties.getProvider().put("my-oauth-provider", provider);
|
||||
Map<String, ClientRegistration> registrations = OAuth2ClientPropertiesRegistrationAdapter
|
||||
.getClientRegistrations(properties);
|
||||
assertThat(registrations.get("registration").getProviderDetails().getConfigurationMetadata()
|
||||
.get("end_session_endpoint")).isEqualTo("https://myendsessionendpoint");
|
||||
}
|
||||
|
||||
@Test
|
||||
void oidcProviderConfigurationWithCustomConfigurationOverridesProviderDefaults() throws Exception {
|
||||
this.server = new MockWebServer();
|
||||
|
|
|
|||
|
|
@ -3219,7 +3219,6 @@ You can register multiple OAuth2 clients and providers under the `spring.securit
|
|||
spring.security.oauth2.client.provider.my-oauth-provider.user-info-authentication-method=header
|
||||
spring.security.oauth2.client.provider.my-oauth-provider.jwk-set-uri=https://my-auth-server/token_keys
|
||||
spring.security.oauth2.client.provider.my-oauth-provider.user-name-attribute=name
|
||||
spring.security.oauth2.client.provider.my-oauth-provider.configuration-metadata.end_session_endpoint=https://my-end-session-endpoint
|
||||
----
|
||||
|
||||
For OpenID Connect providers that support https://openid.net/specs/openid-connect-discovery-1_0.html[OpenID Connect discovery], the configuration can be further simplified.
|
||||
|
|
|
|||
Loading…
Reference in New Issue