Package org.apache.wss4j.dom.common

Examples of org.apache.wss4j.dom.common.CustomHandler.receive()


       
        CustomHandler handler = new CustomHandler();
        List<Integer> receivedActions = new ArrayList<Integer>();
        receivedActions.add(WSConstants.SIGN);
        receivedActions.add(WSConstants.TS);
        handler.receive(receivedActions, reqData);
       
        WSSecurityEngine securityEngine = new WSSecurityEngine();
        return securityEngine.processSecurityHeader(doc, "", reqData);
    }
   
View Full Code Here


        messageContext = new java.util.TreeMap<String, Object>();
        messageContext.put(WSHandlerConstants.PW_CALLBACK_REF, this);
        reqData.setMsgContext(messageContext);
        reqData.setUsername("");
       
        handler.receive(Collections.singletonList(WSConstants.SIGN), reqData);
       
        secEngine.processSecurityHeader(doc, null, this, null, crypto);
    }
   
   
View Full Code Here

        Map<String, Object> messageContext = new TreeMap<String, Object>();
        messageContext = new java.util.TreeMap<String, Object>();
        messageContext.put(WSHandlerConstants.REQUIRE_SIGNED_ENCRYPTED_DATA_ELEMENTS, Boolean.toString(reqSignedEncData));
        reqData.setMsgContext(messageContext);
        CustomHandler handler = new CustomHandler();
        handler.receive(WSSecurityUtil.decodeAction("Encrypt Signature"), reqData);
        reqData.setCallbackHandler(callbackHandler);
        reqData.setSigVerCrypto(crypto);
        reqData.setDecCrypto(crypto);
        return reqData;
    }
View Full Code Here

        java.util.Map<String, Object> msgContext = new java.util.HashMap<String, Object>();
        msgContext.put(WSHandlerConstants.SIG_VER_PROP_FILE, "crypto.properties");
        reqData.setMsgContext(msgContext);
       
        CustomHandler handler = new CustomHandler();
        handler.receive(Collections.singletonList(WSConstants.ST_SIGNED), reqData);
       
        secEngine.processSecurityHeader(
            signedDoc, null, callbackHandler, reqData.getSigVerCrypto(), reqData.getDecCrypto()
        );
    }
View Full Code Here

        //
        // It should fail on a different password type
        //
        config.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
        reqData.setMsgContext(config);
        handler.receive(Collections.singletonList(WSConstants.UT), reqData);
        WSSecurityEngine secEngine = new WSSecurityEngine();
        secEngine.setWssConfig(reqData.getWssConfig());
       
        try {
            secEngine.processSecurityHeader(doc, null, callbackHandler, null);
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.