Skip to content

Commit 5975e7b

Browse files
dreis2211snicoll
authored andcommitted
Fix some deprecation warnings
See gh-20527
1 parent b3c7348 commit 5975e7b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyRegistrationConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,8 +69,8 @@ private RelyingPartyRegistration asRegistration(String id, Registration properti
6969
RelyingPartyRegistration.Builder builder = RelyingPartyRegistration.withRegistrationId(id);
7070
builder.assertionConsumerServiceUrlTemplate(
7171
"{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI);
72-
builder.idpWebSsoUrl(properties.getIdentityprovider().getSsoUrl());
73-
builder.remoteIdpEntityId(properties.getIdentityprovider().getEntityId());
72+
builder.providerDetails((details) -> details.webSsoUrl(properties.getIdentityprovider().getSsoUrl()));
73+
builder.providerDetails((details) -> details.entityId(properties.getIdentityprovider().getEntityId()));
7474
builder.credentials((credentials) -> credentials.addAll(asCredentials(properties)));
7575
return builder.build();
7676
}

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyAutoConfigurationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,9 +79,9 @@ void relyingPartyRegistrationRepositoryBeanShouldBeCreatedWhenPropertiesPresent(
7979
this.contextRunner.withPropertyValues(getPropertyValues()).run((context) -> {
8080
RelyingPartyRegistrationRepository repository = context.getBean(RelyingPartyRegistrationRepository.class);
8181
RelyingPartyRegistration registration = repository.findByRegistrationId("foo");
82-
assertThat(registration.getIdpWebSsoUrl())
82+
assertThat(registration.getProviderDetails().getWebSsoUrl())
8383
.isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php");
84-
assertThat(registration.getRemoteIdpEntityId())
84+
assertThat(registration.getProviderDetails().getEntityId())
8585
.isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php");
8686
assertThat(registration.getAssertionConsumerServiceUrlTemplate())
8787
.isEqualTo("{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI);

0 commit comments

Comments
 (0)