@@ -91,10 +91,10 @@ private RelyingPartyRegistration asRegistration(String id, Registration properti
91
91
AssertingPartyProperties assertingParty = new AssertingPartyProperties (properties , id );
92
92
boolean usingMetadata = StringUtils .hasText (assertingParty .getMetadataUri ());
93
93
Builder builder = (!usingMetadata ) ? RelyingPartyRegistration .withRegistrationId (id )
94
- : createBuilderUsingMetadata (id , assertingParty ).registrationId (id );
94
+ : createBuilderUsingMetadata (assertingParty ).registrationId (id );
95
95
builder .assertionConsumerServiceLocation (properties .getAcs ().getLocation ());
96
96
builder .assertionConsumerServiceBinding (properties .getAcs ().getBinding ());
97
- builder .assertingPartyDetails (mapAssertingParty (properties , id , usingMetadata ));
97
+ builder .assertingPartyDetails (mapAssertingParty (properties , id ));
98
98
builder .signingX509Credentials ((credentials ) -> properties .getSigning ()
99
99
.getCredentials ()
100
100
.stream ()
@@ -120,8 +120,7 @@ private RelyingPartyRegistration asRegistration(String id, Registration properti
120
120
return registration ;
121
121
}
122
122
123
- private RelyingPartyRegistration .Builder createBuilderUsingMetadata (String id ,
124
- AssertingPartyProperties properties ) {
123
+ private RelyingPartyRegistration .Builder createBuilderUsingMetadata (AssertingPartyProperties properties ) {
125
124
String requiredEntityId = properties .getEntityId ();
126
125
Collection <Builder > candidates = RelyingPartyRegistrations
127
126
.collectionFromMetadataLocation (properties .getMetadataUri ());
@@ -139,17 +138,14 @@ private Object getEntityId(RelyingPartyRegistration.Builder candidate) {
139
138
return result [0 ];
140
139
}
141
140
142
- private Consumer <AssertingPartyDetails .Builder > mapAssertingParty (Registration registration , String id ,
143
- boolean usingMetadata ) {
141
+ private Consumer <AssertingPartyDetails .Builder > mapAssertingParty (Registration registration , String id ) {
144
142
return (details ) -> {
145
143
AssertingPartyProperties assertingParty = new AssertingPartyProperties (registration , id );
146
144
PropertyMapper map = PropertyMapper .get ().alwaysApplyingWhenNonNull ();
147
145
map .from (assertingParty ::getEntityId ).to (details ::entityId );
148
146
map .from (assertingParty ::getSingleSignonBinding ).to (details ::singleSignOnServiceBinding );
149
147
map .from (assertingParty ::getSingleSignonUrl ).to (details ::singleSignOnServiceLocation );
150
- map .from (assertingParty ::getSingleSignonSignRequest )
151
- .when ((ignored ) -> !usingMetadata )
152
- .to (details ::wantAuthnRequestsSigned );
148
+ map .from (assertingParty ::getSingleSignonSignRequest ).to (details ::wantAuthnRequestsSigned );
153
149
map .from (assertingParty .getSinglelogoutUrl ()).to (details ::singleLogoutServiceLocation );
154
150
map .from (assertingParty .getSinglelogoutResponseUrl ()).to (details ::singleLogoutServiceResponseLocation );
155
151
map .from (assertingParty .getSinglelogoutBinding ()).to (details ::singleLogoutServiceBinding );
0 commit comments