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 gh-8777
  • Loading branch information
jzheaux committed Jul 7, 2020
1 parent 4269cb0 commit 8e8a642
Show file tree
Hide file tree
Showing 11 changed files with 470 additions and 192 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().getAssertingPartyDetails().getWantAuthnRequestsSigned() ?
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().getAssertingPartyDetails().getWantAuthnRequestsSigned()) {
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().getAssertingPartyDetails().getSingleSignOnServiceLocation();
}

/**
Expand Down
Loading

0 comments on commit 8e8a642

Please sign in to comment.