Package org.apache.cxf.ws.security.wss4j

Examples of org.apache.cxf.ws.security.wss4j.WSS4JStaxOutInterceptor


                new SecurePart(new QName("http://www.w3.org/2005/08/addressing", "ReplyTo"),
                    SecurePart.Modifier.Element)
            );
            properties.setCallbackHandler(new UTPasswordCallback());
           
            WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
            bus.getOutInterceptors().add(ohandler);
           
            WSSSecurityProperties inProperties = new WSSSecurityProperties();
            inProperties.addAction(WSSConstants.USERNAMETOKEN);
            inProperties.addAction(WSSConstants.TIMESTAMP);
View Full Code Here


        properties.addSignaturePart(
            new SecurePart(new QName(WSSConstants.NS_SOAP11, "Body"), SecurePart.Modifier.Content)
        );
        properties.setCallbackHandler(new UTPasswordCallback());
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        bus.getOutInterceptors().add(ohandler);
       
        WSSSecurityProperties inProperties = new WSSSecurityProperties();
        inProperties.addAction(WSSConstants.USERNAMETOKEN);
        inProperties.addAction(WSSConstants.TIMESTAMP);
View Full Code Here

           
            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();
            org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
            client.getInInterceptors().add(new WSS4JStaxInInterceptor(inProperties));
            client.getOutInterceptors().add(new WSS4JStaxOutInterceptor(properties));

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMe...");
View Full Code Here

        properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_TEXT);
        properties.setTokenUser("Alice");
       
        properties.setCallbackHandler(new UTPasswordCallback());
       
        impl.getOutInterceptors().add(new WSS4JStaxOutInterceptor(properties));

        WSSSecurityProperties inProperties = new WSSSecurityProperties();
        inProperties.addAction(WSSConstants.USERNAMETOKEN);
        inProperties.addAction(WSSConstants.TIMESTAMP);
        inProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
View Full Code Here

        List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>();
        actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
        properties.setActions(actions);
        properties.setSamlCallbackHandler(new SAML1CallbackHandler());
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

        client.getOutInterceptors().add(new LoggingOutInterceptor());
       
        Map<String, Object> outConfig = new HashMap<String, Object>();
        outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_UNSIGNED);
        outConfig.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
       
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

       
        properties.setSignatureKeyIdentifier(
            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
        );
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

        Map<String, Object> outConfig = new HashMap<String, Object>();
        outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
        outConfig.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
        outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
        outConfig.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);

        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

        List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>();
        actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
        properties.setActions(actions);
        properties.setSamlCallbackHandler(new SAML2CallbackHandler());
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

        client.getOutInterceptors().add(new LoggingOutInterceptor());
       
        Map<String, Object> outConfig = new HashMap<String, Object>();
        outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_UNSIGNED);
        outConfig.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler());
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);

        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.security.wss4j.WSS4JStaxOutInterceptor

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.