Search in sources :

Example 1 with SAML2ArtifactBindingMessageReceiver

use of org.pac4j.saml.sso.artifact.SAML2ArtifactBindingMessageReceiver in project pac4j by pac4j.

the class SAML2Client method initSAMLProfileHandler.

protected void initSAMLProfileHandler() {
    final SAML2MessageReceiver messageReceiver;
    if (configuration.getResponseBindingType().equals(SAMLConstants.SAML2_POST_BINDING_URI)) {
        messageReceiver = new SAML2WebSSOMessageReceiver(this.authnResponseValidator, this.configuration);
    } else if (configuration.getResponseBindingType().equals(SAMLConstants.SAML2_ARTIFACT_BINDING_URI)) {
        messageReceiver = new SAML2ArtifactBindingMessageReceiver(this.authnResponseValidator, this.idpMetadataResolver, this.spMetadataResolver, this.soapPipelineProvider, this.configuration);
    } else {
        throw new TechnicalException("Unsupported response binding type: " + configuration.getResponseBindingType());
    }
    this.profileHandler = new SAML2WebSSOProfileHandler(new SAML2WebSSOMessageSender(this.signatureSigningParametersProvider, this.configuration.getAuthnRequestBindingType(), true, this.configuration.isAuthnRequestSigned()), messageReceiver);
}
Also used : SAML2WebSSOMessageSender(org.pac4j.saml.sso.impl.SAML2WebSSOMessageSender) TechnicalException(org.pac4j.core.exception.TechnicalException) SAML2WebSSOProfileHandler(org.pac4j.saml.sso.impl.SAML2WebSSOProfileHandler) SAML2MessageReceiver(org.pac4j.saml.profile.api.SAML2MessageReceiver) SAML2WebSSOMessageReceiver(org.pac4j.saml.sso.impl.SAML2WebSSOMessageReceiver) SAML2ArtifactBindingMessageReceiver(org.pac4j.saml.sso.artifact.SAML2ArtifactBindingMessageReceiver)

Aggregations

TechnicalException (org.pac4j.core.exception.TechnicalException)1 SAML2MessageReceiver (org.pac4j.saml.profile.api.SAML2MessageReceiver)1 SAML2ArtifactBindingMessageReceiver (org.pac4j.saml.sso.artifact.SAML2ArtifactBindingMessageReceiver)1 SAML2WebSSOMessageReceiver (org.pac4j.saml.sso.impl.SAML2WebSSOMessageReceiver)1 SAML2WebSSOMessageSender (org.pac4j.saml.sso.impl.SAML2WebSSOMessageSender)1 SAML2WebSSOProfileHandler (org.pac4j.saml.sso.impl.SAML2WebSSOProfileHandler)1