fixes SAMLIdentityProvider not honoring SamlAuthenticationPreprocessor (keycloak/keycloak#27875)

Signed-off-by: Nicola Beghin <nicolabeghin@gmail.com>
This commit is contained in:
Nicola Beghin 2024-03-13 18:05:00 +01:00 committed by Marek Posolda
parent fe06df67c2
commit a7e5c861cc

View file

@ -204,9 +204,9 @@ public class SAMLIdentityProvider extends AbstractIdentityProvider<SAMLIdentityP
request.getAuthenticationSession().setClientNote(SamlProtocol.SAML_REQUEST_ID_BROKER, authnRequest.getID());
if (postBinding) {
return binding.postBinding(authnRequestBuilder.toDocument()).request(destinationUrl);
return binding.postBinding(SAML2Request.convert(authnRequest)).request(destinationUrl);
} else {
return binding.redirectBinding(authnRequestBuilder.toDocument()).request(destinationUrl);
return binding.redirectBinding(SAML2Request.convert(authnRequest)).request(destinationUrl);
}
} catch (Exception e) {
throw new IdentityBrokerException("Could not create authentication request.", e);