Examples of SignatureConfirmation


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

            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

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

            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

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

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

     * 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

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

        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

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

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

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

            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

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

     * 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

Examples of org.opensaml.ws.wssecurity.SignatureConfirmation

*/
public class SignatureConfirmationUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        SignatureConfirmation sc = (SignatureConfirmation) xmlObject;
       
        QName attrName =
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix());
        if (SignatureConfirmation.WSU_ID_ATTR_NAME.equals(attrName)) {
            sc.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (SignatureConfirmation.VALUE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            sc.setValue(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
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.