Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Commit 3202d0a

Browse files
committed
Feedback. Part 5.
#436 (comment)
1 parent db240a4 commit 3202d0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/service-provider/starter/src/main/java/org/springframework/security/config/annotation/web/configurers/Saml2ServiceProviderConfigurer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Saml2ServiceProviderConfigurer serviceProviderEntityId(String entityId) {
5757
return this;
5858
}
5959

60-
public Saml2ServiceProviderConfigurer addServiceProviderKey(Saml2X509Credential key) {
60+
public Saml2ServiceProviderConfigurer addServiceProviderCredentials(Saml2X509Credential key) {
6161
this.spCredentials.add(key);
6262
return this;
6363
}

samples/service-provider/starter/src/main/java/sample/SecurityConfig.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected void configure(HttpSecurity http) throws Exception {
4343
.apply(
4444
Saml2ServiceProviderConfigurer.saml2Login()
4545
.serviceProviderEntityId("http://localhost:8080/sample-sp")
46-
.addServiceProviderKey(getLocalSpKey())
46+
.addServiceProviderCredentials(getLocalSpCredentials())
4747
.addIdentityProvider(
4848
new Saml2IdentityProviderDetails(
4949
"http://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
@@ -62,7 +62,7 @@ protected void configure(HttpSecurity http) throws Exception {
6262
//@formatter:on
6363
}
6464

65-
private Saml2X509Credential getLocalSpKey() {
65+
private Saml2X509Credential getLocalSpCredentials() {
6666
PrivateKey pkey = readPrivateKey(privateKey, privateKeyPassphrase);
6767
X509Certificate spCert = getCertificate(certificate);
6868
return new Saml2X509Credential(pkey, spCert);

0 commit comments

Comments
 (0)