Skip to content

Commit 8e8a642

Browse files
committed
Use Spec Language in RelyingPartyRegistration
Changed conventions to better follow the metadata descriptors that the registration is meant to represent. Closes gh-8777
1 parent 4269cb0 commit 8e8a642

File tree

11 files changed

+470
-192
lines changed

11 files changed

+470
-192
lines changed

saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationRequestFactory.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public String createAuthenticationRequest(Saml2AuthenticationRequest request) {
5757
@Override
5858
public Saml2PostAuthenticationRequest createPostAuthenticationRequest(Saml2AuthenticationRequestContext context) {
5959
AuthnRequest authnRequest = createAuthnRequest(context);
60-
String xml = context.getRelyingPartyRegistration().getProviderDetails().isSignAuthNRequest() ?
60+
String xml = context.getRelyingPartyRegistration().getAssertingPartyDetails().getWantAuthnRequestsSigned() ?
6161
this.saml.serialize(authnRequest, context.getRelyingPartyRegistration().getSigningCredentials()) :
6262
this.saml.serialize(authnRequest);
6363

@@ -78,7 +78,7 @@ public Saml2RedirectAuthenticationRequest createRedirectAuthenticationRequest(Sa
7878
result.samlRequest(deflatedAndEncoded)
7979
.relayState(context.getRelayState());
8080

81-
if (context.getRelyingPartyRegistration().getProviderDetails().isSignAuthNRequest()) {
81+
if (context.getRelyingPartyRegistration().getAssertingPartyDetails().getWantAuthnRequestsSigned()) {
8282
List<Saml2X509Credential> signingCredentials = context.getRelyingPartyRegistration().getSigningCredentials();
8383
Map<String, String> signedParams = this.saml.signQueryParameters(
8484
signingCredentials,

saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/Saml2AuthenticationRequestContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public String getRelayState() {
9191
* @return the Destination value
9292
*/
9393
public String getDestination() {
94-
return this.getRelyingPartyRegistration().getProviderDetails().getWebSsoUrl();
94+
return this.getRelyingPartyRegistration().getAssertingPartyDetails().getSingleSignOnServiceLocation();
9595
}
9696

9797
/**

0 commit comments

Comments
 (0)