Commit df8c25e2 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #20527 from dreis2211

* pr/20527:
  Fix some deprecation warnings

Closes gh-20527
parents b3c73487 5975e7bd
/*
* 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");
* you may not use this file except in compliance with the License.
......@@ -69,8 +69,8 @@ class Saml2RelyingPartyRegistrationConfiguration {
RelyingPartyRegistration.Builder builder = RelyingPartyRegistration.withRegistrationId(id);
builder.assertionConsumerServiceUrlTemplate(
"{baseUrl}" + Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI);
builder.idpWebSsoUrl(properties.getIdentityprovider().getSsoUrl());
builder.remoteIdpEntityId(properties.getIdentityprovider().getEntityId());
builder.providerDetails((details) -> details.webSsoUrl(properties.getIdentityprovider().getSsoUrl()));
builder.providerDetails((details) -> details.entityId(properties.getIdentityprovider().getEntityId()));
builder.credentials((credentials) -> credentials.addAll(asCredentials(properties)));
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");
* you may not use this file except in compliance with the License.
......@@ -79,9 +79,9 @@ public class Saml2RelyingPartyAutoConfigurationTests {
this.contextRunner.withPropertyValues(getPropertyValues()).run((context) -> {
RelyingPartyRegistrationRepository repository = context.getBean(RelyingPartyRegistrationRepository.class);
RelyingPartyRegistration registration = repository.findByRegistrationId("foo");
assertThat(registration.getIdpWebSsoUrl())
assertThat(registration.getProviderDetails().getWebSsoUrl())
.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");
assertThat(registration.getAssertionConsumerServiceUrlTemplate())
.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