Package org.apache.wss4j.dom.common

Examples of org.apache.wss4j.dom.common.CustomHandler


        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        HandlerAction action = new HandlerAction(WSConstants.DKT_ENCR);
        handler.send(
            doc,
            reqData,
            Collections.singletonList(action),
            true
        );
View Full Code Here


        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "SecurityContextToken");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        HandlerAction action = new HandlerAction(WSConstants.DKT_ENCR);
        handler.send(
            doc,
            reqData,
            Collections.singletonList(action),
            true
        );
View Full Code Here

        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        List<HandlerAction> actions = new ArrayList<HandlerAction>();
        actions.add(new HandlerAction(WSConstants.DKT_SIGN));
        actions.add(new HandlerAction(WSConstants.DKT_ENCR));
        handler.send(
            doc,
            reqData,
            actions,
            true
        );
View Full Code Here

        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        List<HandlerAction> actions = new ArrayList<HandlerAction>();
        actions.add(new HandlerAction(WSConstants.DKT_ENCR));
        actions.add(new HandlerAction(WSConstants.DKT_SIGN));
        handler.send(
            doc,
            reqData,
            actions,
            true
        );
View Full Code Here

        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "SecurityContextToken");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        List<HandlerAction> actions = new ArrayList<HandlerAction>();
        actions.add(new HandlerAction(WSConstants.DKT_SIGN));
        actions.add(new HandlerAction(WSConstants.DKT_ENCR));
        handler.send(
            doc,
            reqData,
            actions,
            true
        );
View Full Code Here

        config.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "SecurityContextToken");
        config.put(WSHandlerConstants.DERIVED_TOKEN_KEY_ID, "Thumbprint");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        List<HandlerAction> actions = new ArrayList<HandlerAction>();
        actions.add(new HandlerAction(WSConstants.DKT_ENCR));
        actions.add(new HandlerAction(WSConstants.DKT_SIGN));
        handler.send(
            doc,
            reqData,
            actions,
            true
        );
View Full Code Here

        config.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
        config.put(WSHandlerConstants.USE_SINGLE_CERTIFICATE, "false");
        reqData.setMsgContext(config);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        HandlerAction action = new HandlerAction(WSConstants.SIGN);
        handler.send(
            doc,
            reqData,
            Collections.singletonList(action),
            true
        );
View Full Code Here

            WSHandlerConstants.PW_CALLBACK_REF, new CustomCallbackHandler(timestampElement)
        );
        reqData.setMsgContext(messageContext);
       
        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();
        List<HandlerAction> actions = new ArrayList<HandlerAction>();
        actions.add(new HandlerAction(WSConstants.CUSTOM_TOKEN, null));
        handler.send(
            doc,
            reqData,
            actions,
            true
        );
View Full Code Here

    /**
     * Test that adds a UserNameToken via WSHandler
     */
    @org.junit.Test
    public void testUsernameTokenWSHandler() throws Exception {
        CustomHandler handler = new CustomHandler();
        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
       
        RequestData reqData = new RequestData();
        java.util.Map<String, Object> config = new java.util.TreeMap<String, Object>();
        config.put("password", "verySecret");
        config.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
        reqData.setUsername("wernerd");
        reqData.setMsgContext(config);
       
        HandlerAction action = new HandlerAction(WSConstants.UT);
        handler.send(
            doc,
            reqData,
            Collections.singletonList(action),
            true
        );
View Full Code Here

    /**
     * Test that adds a UserNameToken with no password via WSHandler
     */
    @org.junit.Test
    public void testUsernameTokenWSHandlerNoPassword() throws Exception {
        CustomHandler handler = new CustomHandler();
        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
       
        RequestData reqData = new RequestData();
        java.util.Map<String, Object> config = new java.util.TreeMap<String, Object>();
        config.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_NONE);
        reqData.setUsername("wernerd");
        reqData.setMsgContext(config);
       
        HandlerAction action = new HandlerAction(WSConstants.UT);
        handler.send(
            doc,
            reqData,
            Collections.singletonList(action),
            true
        );
View Full Code Here

TOP

Related Classes of org.apache.wss4j.dom.common.CustomHandler

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.