use of org.pac4j.saml.transport.Pac4jHTTPRedirectDeflateEncoder in project pac4j by pac4j.
the class SAML2LogoutMessageSender method getMessageEncoder.
/**
* Build the WebSSO handler for sending and receiving SAML2 messages.
* @param ctx
* @return the encoder instance
*/
private MessageEncoder getMessageEncoder(final SAML2MessageContext ctx) {
final Pac4jSAMLResponse adapter = ctx.getProfileRequestContextOutboundMessageTransportResponse();
if (SAMLConstants.SAML2_POST_BINDING_URI.equals(destinationBindingType)) {
final VelocityEngine velocityEngine = VelocityEngineFactory.getEngine();
final Pac4jHTTPPostEncoder encoder = new Pac4jHTTPPostEncoder(adapter);
encoder.setVelocityEngine(velocityEngine);
return encoder;
}
if (SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(destinationBindingType)) {
final Pac4jHTTPRedirectDeflateEncoder encoder = new Pac4jHTTPRedirectDeflateEncoder(adapter, forceSignRedirectBindingLogoutRequest);
return encoder;
}
throw new UnsupportedOperationException("Binding type - " + destinationBindingType + " is not supported");
}
use of org.pac4j.saml.transport.Pac4jHTTPRedirectDeflateEncoder in project pac4j by pac4j.
the class SAML2WebSSOMessageSender method getMessageEncoder.
/**
* Build the WebSSO handler for sending and receiving SAML2 messages.
*
* @param ctx the ctx
* @return the encoder instance
*/
private MessageEncoder getMessageEncoder(final SAML2MessageContext ctx) {
final Pac4jSAMLResponse adapter = ctx.getProfileRequestContextOutboundMessageTransportResponse();
if (SAMLConstants.SAML2_POST_BINDING_URI.equals(destinationBindingType)) {
final VelocityEngine velocityEngine = VelocityEngineFactory.getEngine();
final Pac4jHTTPPostEncoder encoder = new Pac4jHTTPPostEncoder(adapter);
encoder.setVelocityEngine(velocityEngine);
return encoder;
}
if (SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(destinationBindingType)) {
return new Pac4jHTTPRedirectDeflateEncoder(adapter, isAuthnRequestSigned);
}
throw new UnsupportedOperationException("Binding type - " + destinationBindingType + " is not supported");
}
Aggregations