* created as part of the HTTP/POST binding
*/
response.recycle();
String samlResponse = PostBindingUtil.base64Encode(baos.toString());
SignatureInfoHolder signatureHolder = null;
if(supportSignature)
{
//SigAlg
String algo = signingKey.getAlgorithm();
String sigAlg = SignatureUtil.getXMLSignatureAlgorithmURI(algo);
sigAlg = URLEncoder.encode(sigAlg, "UTF-8");
byte[] signedValue = SignatureUtil.sign(samlResponse, signingKey);
signatureHolder = new SignatureInfoHolder(signedValue,sigAlg);
}
PostBindingUtil.sendPost(new DestinationInfoHolder(responseType.getDestination(),
samlResponse, relayState), signatureHolder, response, false);
}
}