Commit 5975e7bd authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Fix some deprecation warnings

See gh-20527
parent b3c73487
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -69,8 +69,8 @@ class Saml2RelyingPartyRegistrationConfiguration { ...@@ -69,8 +69,8 @@ class Saml2RelyingPartyRegistrationConfiguration {
RelyingPartyRegistration.Builder builder = RelyingPartyRegistration.withRegistrationId(id); RelyingPartyRegistration.Builder builder = RelyingPartyRegistration.withRegistrationId(id);
builder.assertionConsumerServiceUrlTemplate( builder.assertionConsumerServiceUrlTemplate(
"{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); "{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI);
builder.idpWebSsoUrl(properties.getIdentityprovider().getSsoUrl()); builder.providerDetails((details) -> details.webSsoUrl(properties.getIdentityprovider().getSsoUrl()));
builder.remoteIdpEntityId(properties.getIdentityprovider().getEntityId()); builder.providerDetails((details) -> details.entityId(properties.getIdentityprovider().getEntityId()));
builder.credentials((credentials) -> credentials.addAll(asCredentials(properties))); builder.credentials((credentials) -> credentials.addAll(asCredentials(properties)));
return builder.build(); return builder.build();
} }
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -79,9 +79,9 @@ public class Saml2RelyingPartyAutoConfigurationTests { ...@@ -79,9 +79,9 @@ public class Saml2RelyingPartyAutoConfigurationTests {
this.contextRunner.withPropertyValues(getPropertyValues()).run((context) -> { this.contextRunner.withPropertyValues(getPropertyValues()).run((context) -> {
RelyingPartyRegistrationRepository repository = context.getBean(RelyingPartyRegistrationRepository.class); RelyingPartyRegistrationRepository repository = context.getBean(RelyingPartyRegistrationRepository.class);
RelyingPartyRegistration registration = repository.findByRegistrationId("foo"); RelyingPartyRegistration registration = repository.findByRegistrationId("foo");
assertThat(registration.getIdpWebSsoUrl()) assertThat(registration.getProviderDetails().getWebSsoUrl())
.isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php"); .isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php");
assertThat(registration.getRemoteIdpEntityId()) assertThat(registration.getProviderDetails().getEntityId())
.isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php"); .isEqualTo("https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php");
assertThat(registration.getAssertionConsumerServiceUrlTemplate()) assertThat(registration.getAssertionConsumerServiceUrlTemplate())
.isEqualTo("{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); .isEqualTo("{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment