Package org.apache.ws.security.message.token

Examples of org.apache.ws.security.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 =
                org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
View Full Code Here


     *
     * @param doc
     *            The SOAP envelope as W3C document
     */
    public void prepare(Document doc) {
        sc = new SignatureConfirmation(doc, signatureValue);
        String scId = "SigConf-" + sc.hashCode();
        sc.setID(scId);
    }
View Full Code Here

            log.debug("Found SignatureConfirmation list element");
        }
        /*
         * Decode SignatureConfirmation, just store in result
         */
        SignatureConfirmation sigConf = new SignatureConfirmation(
                (Element) elem);
        returnResults.add(0, new WSSecurityEngineResult(WSConstants.SC,
                sigConf));
       
        scId = elem.getAttributeNS(WSConstants.WSU_NS, "Id");
View Full Code Here

         *  If a matching value found: remove from vector of stored signature values
         */
        for (int i = 0; i < sigConf.size(); i++) {
            WSSecurityEngineResult result =
                (WSSecurityEngineResult)sigConf.get(i);
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION);

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (sigv == null || sigv.size() == 0) {
                    // If there are no stored signature values
                    if (sigVal.length != 0) {
                        // If there's no value in the case where there are no
View Full Code Here

            log.debug("Found SignatureConfirmation list element");
        }
        //
        // Decode SignatureConfirmation, just store in result
        //
        SignatureConfirmation sigConf = new SignatureConfirmation(elem);
        String id = sigConf.getID();
        // A wsu:Id is required as per the BSP spec
        if (data.getWssConfig().isWsiBSPCompliant() && (id == null || "".equals(id))) {
            throw new WSSecurityException(
                WSSecurityException.INVALID_SECURITY,
                "requiredElementNoID",
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 a matching value found: remove from vector of stored signature values
         */
        for (int i = 0; i < sigConf.size(); i++) {
            WSSecurityEngineResult result =
                (WSSecurityEngineResult)sigConf.get(i);
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION);

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (sigv == null || sigv.size() == 0) {
                    // If there are no stored signature values
                    if (sigVal.length != 0) {
                        // If there's no value in the case where there are no
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 a matching value found: remove from vector of stored signature values
         */
        for (int i = 0; i < sigConf.size(); i++) {
            WSSecurityEngineResult result =
                (WSSecurityEngineResult)sigConf.get(i);
            SignatureConfirmation sc =
                (SignatureConfirmation)result.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION);

            byte[] sigVal = sc.getSignatureValue();
            if (sigVal != null) {
                if (sigv == null || sigv.size() == 0) {
                    // If there are no stored signature values
                    if (sigVal.length != 0) {
                        // If there's no value in the case where there are no
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

TOP

Related Classes of org.apache.ws.security.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.