Package org.apache.cxf.rs.security.xml

Examples of org.apache.cxf.rs.security.xml.XmlSigOutInterceptor


   
    public void doTestEnvelopedSAMLToken(boolean signed) throws Exception {
        String address = "https://localhost:" + PORT + "/samlxml/bookstore/books";
        WebClient wc = createWebClient(address, new SamlEnvelopedOutInterceptor(!signed),
                                       null, signed);
        XmlSigOutInterceptor xmlSig = new XmlSigOutInterceptor();
        if (signed) {
            xmlSig.setStyle(XmlSigOutInterceptor.DETACHED_SIG);
        }
               
        WebClient.getConfig(wc).getOutInterceptors().add(xmlSig);
        wc.type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML);
        try {
View Full Code Here


        if (cryptoUrlPrefix != null) {
            cryptoUrl = cryptoUrlPrefix + this.getClass().getResource("/" + cryptoUrl).toURI().getPath();
        }
        properties.put("ws-security.signature.properties", cryptoUrl);
        bean.setProperties(properties);
        XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
        if (enveloping) {
            sigInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
        }
        bean.getOutInterceptors().add(sigInterceptor);
        bean.setServiceClass(BookStore.class);
       
        BookStore store = bean.create(BookStore.class);
View Full Code Here

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.signature.username", "alice");
        properties.put("ws-security.signature.properties",
                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
        bean.setProperties(properties);
        XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
        if (enveloping) {
            sigInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
        }
        bean.getOutInterceptors().add(sigInterceptor);
        bean.getInInterceptors().add(new XmlSigInInterceptor());
       
        WebClient wc = bean.createWebClient();
View Full Code Here

        Bus springBus = bf.createBus(busFile.toString());
        bean.setBus(springBus);

        bean.setProperties(properties);
        if (sign) {
            bean.getOutInterceptors().add(new XmlSigOutInterceptor());
        }
        XmlEncOutInterceptor encInterceptor = new XmlEncOutInterceptor();
        encInterceptor.setKeyIdentifierType(keyIdentifierType);
        encInterceptor.setSymmetricEncAlgorithm(symmetricAlgorithm);
        encInterceptor.setDigestAlgorithm(digestAlgorithm);
View Full Code Here

        if (streaming) {
            XmlSecOutInterceptor sigInterceptor = new XmlSecOutInterceptor();
            sigInterceptor.setSignRequest(true);
            bean.getOutInterceptors().add(sigInterceptor);
        } else {
            XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
            if (enveloping) {
                sigInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
            }
            bean.getOutInterceptors().add(sigInterceptor);
        }
        bean.setServiceClass(BookStore.class);
       
View Full Code Here

            if (!useKeyInfo) {
                sigInInterceptor.setSignatureVerificationAlias("alice");
            }
            bean.getInInterceptors().add(sigInInterceptor);
        } else {
            XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
            if (enveloping) {
                sigOutInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
            }
            sigOutInterceptor.setKeyInfoMustBeAvailable(useKeyInfo);
            bean.getOutInterceptors().add(sigOutInterceptor);
           
            XmlSigInInterceptor sigInInterceptor = new XmlSigInInterceptor();
            sigInInterceptor.setKeyInfoMustBeAvailable(useKeyInfo);
            bean.getInInterceptors().add(sigInInterceptor);
View Full Code Here

            XmlSecInInterceptor encInInterceptor = new XmlSecInInterceptor();
            encInInterceptor.setRequireEncryption(true);
            bean.getInInterceptors().add(encInInterceptor);
        } else {
            if (sign) {
                bean.getOutInterceptors().add(new XmlSigOutInterceptor());
            }
            XmlEncOutInterceptor encInterceptor = new XmlEncOutInterceptor();
            encInterceptor.setKeyIdentifierType(encryptionProperties.getEncryptionKeyIdType());
            encInterceptor.setSymmetricEncAlgorithm(encryptionProperties.getEncryptionSymmetricKeyAlgo());
            encInterceptor.setDigestAlgorithm(encryptionProperties.getEncryptionDigestAlgo());
View Full Code Here

                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
        properties.put("ws-security.signature.properties",
                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
        bean.setProperties(properties);
       
        XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
        bean.getOutInterceptors().add(sigInterceptor);
        bean.getInInterceptors().add(new XmlEncInInterceptor());
        bean.getInInterceptors().add(new XmlSigInInterceptor());

        bean.setServiceClass(BookStore.class);
View Full Code Here

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.signature.username", "alice");
        properties.put("ws-security.signature.properties",
                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
        bean.setProperties(properties);
        XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
        if (enveloping) {
            sigInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
        }
        bean.getOutInterceptors().add(sigInterceptor);
        bean.setServiceClass(BookStore.class);
       
        BookStore store = bean.create(BookStore.class);
View Full Code Here

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.signature.username", "alice");
        properties.put("ws-security.signature.properties",
                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
        bean.setProperties(properties);
        XmlSigOutInterceptor sigInterceptor = new XmlSigOutInterceptor();
        if (enveloping) {
            sigInterceptor.setStyle(XmlSigOutInterceptor.ENVELOPING_SIG);
        }
        bean.getOutInterceptors().add(sigInterceptor);
       
       
        WebClient wc = bean.createWebClient();
View Full Code Here

TOP

Related Classes of org.apache.cxf.rs.security.xml.XmlSigOutInterceptor

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.