Package org.apache.wss4j.dom.message.token

Examples of org.apache.wss4j.dom.message.token.SignatureConfirmation


        // - if there is a signature value and no matching Signature value found: error
        //
        //  If a matching value found: remove from vector of stored signature values
        //
        for (WSSecurityEngineResult result : sigConf) {
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(
                    WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION
                );

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (savedSignatures == null || savedSignatures.size() == 0) {
                    //
                    // If there are no stored signature values, and we've received a
                    // SignatureConfirmation element then throw an Exception
View Full Code Here


            LOG.debug("Found SignatureConfirmation list element");
        }
        //
        // Decode SignatureConfirmation, just store in result
        //
        SignatureConfirmation sigConf = new SignatureConfirmation(elem, data.getBSPEnforcer());

        WSSecurityEngineResult result =
            new WSSecurityEngineResult(WSConstants.SC, sigConf);
        result.put(WSSecurityEngineResult.TAG_ID, sigConf.getID());
        wsDocInfo.addResult(result);
        wsDocInfo.addTokenElement(elem);
        return java.util.Collections.singletonList(result);
    }
View Full Code Here

            log.debug("Found SignatureConfirmation list element");
        }
        //
        // Decode SignatureConfirmation, just store in result
        //
        SignatureConfirmation sigConf = new SignatureConfirmation(elem, data.getBSPEnforcer());

        WSSecurityEngineResult result =
            new WSSecurityEngineResult(WSConstants.SC, sigConf);
        result.put(WSSecurityEngineResult.TAG_ID, sigConf.getID());
        wsDocInfo.addResult(result);
        wsDocInfo.addTokenElement(elem);
        return java.util.Collections.singletonList(result);
    }
View Full Code Here

        // - if there is a signature value and no matching Signature value found: error
        //
        //  If a matching value found: remove from vector of stored signature values
        //
        for (WSSecurityEngineResult result : sigConf) {
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(
                    WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION
                );

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (savedSignatures == null || savedSignatures.size() == 0) {
                    //
                    // If there are no stored signature values, and we've received a
                    // SignatureConfirmation element then throw an Exception
View Full Code Here

     * filed <code>signatureValue</code> must be set
     *
     * @param doc The SOAP envelope as W3C document
     */
    public void prepare(Document doc) {
        sc = new SignatureConfirmation(doc, signatureValue);
        sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc));
    }
View Full Code Here

        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        WSSecHeader secHeader = new WSSecHeader();
        secHeader.insertSecurityHeader(doc);
       
        byte[] randomBytes = WSSecurityUtil.generateNonce(20);
        SignatureConfirmation sigConf = new SignatureConfirmation(doc, randomBytes);
        Element sigConfElement = sigConf.getElement();
        secHeader.getSecurityHeader().appendChild(sigConfElement);
       
        if (LOG.isDebugEnabled()) {
            String outputString =
                XMLUtils.PrettyDocumentToString(doc);
View Full Code Here

        // - if there is a signature value and no matching Signature value found: error
        //
        //  If a matching value found: remove from vector of stored signature values
        //
        for (WSSecurityEngineResult result : sigConf) {
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(
                    WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION
                );

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (savedSignatures == null || savedSignatures.size() == 0) {
                    //
                    // If there are no stored signature values, and we've received a
                    // SignatureConfirmation element then throw an Exception
View Full Code Here

        // - if there is a signature value and no matching Signature value found: error
        //
        //  If a matching value found: remove from vector of stored signature values
        //
        for (WSSecurityEngineResult result : sigConf) {
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(
                    WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION
                );

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (savedSignatures == null || savedSignatures.size() == 0) {
                    //
                    // If there are no stored signature values, and we've received a
                    // SignatureConfirmation element then throw an Exception
View Full Code Here

            LOG.debug("Found SignatureConfirmation list element");
        }
        //
        // Decode SignatureConfirmation, just store in result
        //
        SignatureConfirmation sigConf = new SignatureConfirmation(elem, data.getBSPEnforcer());

        WSSecurityEngineResult result =
            new WSSecurityEngineResult(WSConstants.SC, sigConf);
        String tokenId = sigConf.getID();
        if (!"".equals(tokenId)) {
            result.put(WSSecurityEngineResult.TAG_ID, tokenId);
        }
        wsDocInfo.addResult(result);
        wsDocInfo.addTokenElement(elem);
View Full Code Here

     * filed <code>signatureValue</code> must be set
     *
     * @param doc The SOAP envelope as W3C document
     */
    public void prepare(Document doc) {
        sc = new SignatureConfirmation(doc, signatureValue);
        sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc));
    }
View Full Code Here

TOP

Related Classes of org.apache.wss4j.dom.message.token.SignatureConfirmation

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.