samlResponse = webRequestUtil.getErrorResponse(referer, status, getIdentityURL(),
this.idpConfiguration.isSupportsSignature());
isErrorResponse = true;
} finally {
try {
WebRequestUtilHolder holder = webRequestUtil.getHolder();
if (destination == null)
throw new ServletException(logger.nullValueError("Destination"));
holder.setResponseDoc(samlResponse).setDestination(destination).setRelayState(relayState)
.setAreWeSendingRequest(willSendRequest).setPrivateKey(null).setSupportSignature(false)
.setErrorResponse(isErrorResponse).setServletResponse(response)
.setPostBindingRequested(requestedPostProfile)
.setDestinationQueryStringWithSignature(destinationQueryStringWithSignature);
/*
* if (requestedPostProfile) holder.setPostBindingRequested(requestedPostProfile); else
* holder.setPostBindingRequested(postProfile);
*/
if (this.idpConfiguration.isSupportsSignature()) {
holder.setPrivateKey(keyManager.getSigningKey()).setSupportSignature(true);
}
holder.setStrictPostBinding(this.idpConfiguration.isStrictPostBinding());
if (holder.isPostBinding())
recycle(response);
if (enableAudit) {
PicketLinkAuditEvent auditEvent = new PicketLinkAuditEvent(AuditLevel.INFO);
auditEvent.setType(PicketLinkAuditEventType.RESPONSE_TO_SP);