use of org.opensaml.saml.saml2.binding.encoding.impl.BaseSAML2MessageEncoder in project cas by apereo.
the class BaseSamlResponseEncoder method encode.
/**
* Encode.
*
* @param samlResponse the saml response
* @param relayState the relay state
* @return the response
* @throws SamlException the saml exception
*/
@SneakyThrows
public final Response encode(final Response samlResponse, final String relayState) throws SamlException {
if (httpResponse != null) {
final BaseSAML2MessageEncoder encoder = getMessageEncoderInstance();
encoder.setHttpServletResponse(httpResponse);
final MessageContext ctx = getEncoderMessageContext(samlResponse, relayState);
encoder.setMessageContext(ctx);
finalizeEncode(encoder, samlResponse, relayState);
}
return samlResponse;
}
use of org.opensaml.saml.saml2.binding.encoding.impl.BaseSAML2MessageEncoder in project cas by apereo.
the class SamlResponseArtifactEncoder method finalizeEncode.
@Override
protected void finalizeEncode(final BaseSAML2MessageEncoder e, final Response samlResponse, final String relayState) throws Exception {
final HTTPArtifactEncoder encoder = (HTTPArtifactEncoder) e;
encoder.setArtifactMap(this.samlArtifactMap);
final MessageContext ctx = getEncoderMessageContext(samlResponse, relayState);
prepareArtifactContext(samlResponse, ctx);
encoder.setMessageContext(ctx);
super.finalizeEncode(encoder, samlResponse, relayState);
}
use of org.opensaml.saml.saml2.binding.encoding.impl.BaseSAML2MessageEncoder in project cas by apereo.
the class SamlResponsePostSimpleSignEncoder method getMessageEncoderInstance.
@Override
protected BaseSAML2MessageEncoder getMessageEncoderInstance() throws Exception {
final HTTPPostSimpleSignEncoder encoder = new HTTPPostSimpleSignEncoder();
encoder.setVelocityEngine(this.velocityEngineFactory);
return encoder;
}
use of org.opensaml.saml.saml2.binding.encoding.impl.BaseSAML2MessageEncoder in project cas by apereo.
the class SamlResponsePostEncoder method getMessageEncoderInstance.
@Override
protected BaseSAML2MessageEncoder getMessageEncoderInstance() {
val encoder = new HTTPPostEncoder();
encoder.setVelocityEngine(this.velocityEngineFactory);
return encoder;
}
use of org.opensaml.saml.saml2.binding.encoding.impl.BaseSAML2MessageEncoder in project cas by apereo.
the class SamlResponsePostSimpleSignEncoder method getMessageEncoderInstance.
@Override
protected BaseSAML2MessageEncoder getMessageEncoderInstance() {
val encoder = new HTTPPostSimpleSignEncoder();
encoder.setVelocityEngine(this.velocityEngineFactory);
return encoder;
}
Aggregations