Skip to content

Commit

Permalink
Use Spec Language in RelyingPartyRegistration
Browse files Browse the repository at this point in the history
Changed conventions to better follow the metadata descriptors that
the registration is meant to represent.

Closes spring-projectsgh-8777
  • Loading branch information
jzheaux committed Jul 3, 2020
1 parent 4fb5ff3 commit c330e1f
Show file tree
Hide file tree
Showing 10 changed files with 387 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public String createAuthenticationRequest(Saml2AuthenticationRequest request) {
@Override
public Saml2PostAuthenticationRequest createPostAuthenticationRequest(Saml2AuthenticationRequestContext context) {
AuthnRequest authnRequest = createAuthnRequest(context);
String xml = context.getRelyingPartyRegistration().getProviderDetails().isSignAuthNRequest() ?
String xml = context.getRelyingPartyRegistration().getProviderDetails().getWantsAuthnRequestsSigned() ?
this.saml.serialize(authnRequest, context.getRelyingPartyRegistration().getSigningCredentials()) :
this.saml.serialize(authnRequest);

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

if (context.getRelyingPartyRegistration().getProviderDetails().isSignAuthNRequest()) {
if (context.getRelyingPartyRegistration().getProviderDetails().getWantsAuthnRequestsSigned()) {
List<Saml2X509Credential> signingCredentials = context.getRelyingPartyRegistration().getSigningCredentials();
Map<String, String> signedParams = this.saml.signQueryParameters(
signingCredentials,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public String getRelayState() {
* @return the Destination value
*/
public String getDestination() {
return this.getRelyingPartyRegistration().getProviderDetails().getWebSsoUrl();
return this.getRelyingPartyRegistration().getProviderDetails().getSingleSignOnServiceLocation();
}

/**
Expand Down
Loading

0 comments on commit c330e1f

Please sign in to comment.