In reference to this SO question Add request parameter to SAML request using Spring Security SAML
I am wanting to replace the default HTTPRedirectDeflateBinding bean
1.I think you need to use the super method buildRedirectURL and then add stripped or your custom query params, like this:
@Override
protected String buildRedirectURL(SAMLMessageContext messagesContext, String endpointURL, String message) throws MessageEncodingException {
URLBuilder redirectUrlBuilder = new URLBuilder(super.buildRedirectURL(messagesContext, endpointURL, message));
List> queryParams = redirectUrlBuilder.getQueryParams();
queryParams.addAll(new URLBuilder(endpointURL).getQueryParams());// add stripped query params
return redirectUrlBuilder.buildURL();
}
2.I am not sure if it fine to pass the null to the HTTPRedirectDeflateBinding as decoder. Alternative would suggest to use the default decoder, which accepts ParserPool.