Package org.opensaml.ws.message.encoder

Examples of org.opensaml.ws.message.encoder.MessageEncoder


        // Get an AuthnRequest builder
        this.authnRequestBuilder = new Saml2AuthnRequestBuilder(forceAuth, comparisonType, destinationBindingType,
                authnContextClassRef, nameIdPolicyFormat);

        // Build the WebSSO handler for sending and receiving SAML2 messages
        MessageEncoder encoder = null;
        if (SAMLConstants.SAML2_POST_BINDING_URI.equals(destinationBindingType)) {
            // Get a velocity engine for the HTTP-POST binding (building of an HTML document)
            VelocityEngine velocityEngine = VelocityEngineFactory.getEngine();
            encoder = new HTTPPostEncoder(velocityEngine, "/templates/saml2-post-binding.vm");
        } else if (SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(destinationBindingType)) {
View Full Code Here


        if (sign) {
            Assert.notNull(samlContext.getLocalSigningCredential(), "Cannot sign outgoing message as no signing credential is set in the context");
            samlContext.setOutboundSAMLMessageSigningCredential(samlContext.getLocalSigningCredential());
        }

        MessageEncoder encoder = binding.getMessageEncoder();
        encoder.encode(samlContext);

        return samlContext;

    }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.message.encoder.MessageEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.