Examples of WSS4JInInterceptor


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

            inProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");

            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
            inProps.put("signatureKeyIdentifier", "DirectReference");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
View Full Code Here

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

        inProps.put("passwordCallbackClass", "demo.wssec.server.UTPasswordCallback");

        inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
        inProps.put("signatureKeyIdentifier", "DirectReference");

        bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

        BusFactory.setDefaultBus(bus);

        new Server();
        System.out.println("Server ready...");
View Full Code Here

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

            inProps.put("encryptionKeyIdentifier", "IssuerSerial");

            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
            inProps.put("signatureKeyIdentifier", "DirectReference");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Sachin Tendulkar"};
View Full Code Here

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

        inProps.put("encryptionKeyIdentifier", "IssuerSerial");

        inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
        inProps.put("signatureKeyIdentifier", "DirectReference");

        bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

        BusFactory.setDefaultBus(bus);

        new Server();
        System.out.println("Server ready...");
View Full Code Here

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

        Map<String, Object> inProps = new HashMap<String, Object>();
        inProps.put("action", "UsernameToken Timestamp");
        inProps.put("passwordType", "PasswordDigest");
        inProps.put("passwordCallbackClass", "demo.wssec.server.UTPasswordCallback");

        bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

        BusFactory.setDefaultBus(bus);

        new Server();
        System.out.println("Server ready...");
View Full Code Here

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

        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
        endpoint.getOutInterceptors().add(wssOut);

        Map<String, Object> inProps = new HashMap<String, Object>();
        inProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
        WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
        endpoint.getInInterceptors().add(wssIn);

        assertEquals(12, calc.multiply(3, 4));
    }
View Full Code Here

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

      if (isSecurityEnabled(message)) {
        Map props = new HashMap();
        props.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
        props.put(WSHandlerConstants.PW_CALLBACK_REF, callbackHandler);

        WSS4JInInterceptor wss4jInHandler = new WSS4JInInterceptor(props);

        message.getInterceptorChain().add(wss4jInHandler);
        message.getInterceptorChain().add(new SAAJInInterceptor());
      }
    }
View Full Code Here

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

    public static final void setupWSS4JChain(final Endpoint endpoint, final Map<String, Object> inProps, final Map<String, Object> outProps) {

        if (null != inProps && !inProps.isEmpty()) {
            endpoint.getInInterceptors().add(new SAAJInInterceptor());
            endpoint.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            // if WS Security is used with a JAX-WS handler (See EjbInterceptor), we have to deal with mustUnderstand flag
            // in WS Security headers. So, let's add an interceptor
            endpoint.getInInterceptors().add(new WSSPassThroughInterceptor());
        }
View Full Code Here

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

        final Map<String, Object> map = new HashMap<String, Object>();
        for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
            map.put(entry.getKey().toString(), entry.getValue());
        }
        properties.clear();
        return new WSS4JInInterceptor(map);
    }
View Full Code Here

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

            inProps.put("encryptionKeyIdentifier", "IssuerSerial");

            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
            inProps.put("signatureKeyIdentifier", "DirectReference");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            // Check to make sure that the SOAP Body and Timestamp were signed,
            // and that the SOAP Body was encrypted
            DefaultCryptoCoverageChecker coverageChecker = new DefaultCryptoCoverageChecker();
            coverageChecker.setSignBody(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.