Package org.apache.wss4j.policy.model

Examples of org.apache.wss4j.policy.model.Attachments


                    } catch (WSSecurityException e) {
                        ai.setNotAsserted(h.getNamespace() + ":" + h.getName() + " not + " + type);
                    }
                }
               
                Attachments attachments = p.getAttachments();
                if (attachments != null) {
                    try {
                        CoverageScope scope = CoverageScope.ELEMENT;
                        if (attachments.isContentSignatureTransform()) {
                            scope = CoverageScope.CONTENT;
                        }
                        CryptoCoverageUtil.checkAttachmentsCoverage(msg.getAttachments(), signed,
                                                                type, scope);
                    } catch (WSSecurityException e) {
View Full Code Here


                                                            head.getNamespace(),
                                                            "Element");
                signedParts.add(wep);
            }
           
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                WSEncryptionPart wep = new WSEncryptionPart("cid:Attachments", "Element");
                signedParts.add(wep);
            }
        }
View Full Code Here

                WSEncryptionPart wep = new WSEncryptionPart(head.getName(),
                                                            head.getNamespace(),
                                                            "Element");
                signedParts.add(wep);
            }
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                String modifier = "Element";
                if (attachments.isContentSignatureTransform()) {
                    modifier = "Content";
                }
                WSEncryptionPart wep = new WSEncryptionPart("cid:Attachments", modifier);
                signedParts.add(wep);
            }
View Full Code Here

    public Assertion build(Element element, AssertionBuilderFactory factory) throws IllegalArgumentException {

        final SPConstants.SPVersion spVersion = SPConstants.SPVersion.getSPVersion(element.getNamespaceURI());
        boolean body = SPUtils.hasChildElementWithName(element, spVersion.getSPConstants().getBody());
        final List<Header> headers = getHeaders(element, true, spVersion);
        final Attachments attachments = getAttachments(element, spVersion);
        body |= !SPUtils.hasChildElements(element);

        EncryptedParts encryptedParts = new EncryptedParts(spVersion, body, attachments, headers);
        encryptedParts.setOptional(SPUtils.isOptional(element));
        encryptedParts.setIgnorable(SPUtils.isIgnorable(element));
View Full Code Here

    public Assertion build(Element element, AssertionBuilderFactory factory) throws IllegalArgumentException {

        final SPConstants.SPVersion spVersion = SPConstants.SPVersion.getSPVersion(element.getNamespaceURI());
        boolean body = SPUtils.hasChildElementWithName(element, spVersion.getSPConstants().getBody());
        final List<Header> headers = getHeaders(element, true, spVersion);
        final Attachments attachments = getAttachments(element, spVersion);
        final boolean signAllHeaders = !SPUtils.hasChildElements(element);
        body |= signAllHeaders;
        SignedParts signedParts = new SignedParts(spVersion, body, attachments, headers, signAllHeaders);
        signedParts.setOptional(SPUtils.isOptional(element));
        signedParts.setIgnorable(SPUtils.isIgnorable(element));
View Full Code Here

        while (child != null) {
            if (spVersion.getSPConstants().getAttachments().getLocalPart().equals(child.getLocalName())
                    && spVersion.getSPConstants().getAttachments().getNamespaceURI().equals(child.getNamespaceURI())) {
                boolean contentSignatureTransform = SPUtils.hasChildElementWithName(child, spVersion.getSPConstants().getContentSignatureTransform());
                boolean attachmentCompleteSignatureTransform = SPUtils.hasChildElementWithName(child, spVersion.getSPConstants().getAttachmentCompleteSignatureTransform());
                return new Attachments(spVersion, contentSignatureTransform, attachmentCompleteSignatureTransform);
            }
            child = SPUtils.getNextSiblingElement(child);
        }
        return null;
    }
View Full Code Here

                                                            head.getNamespace(),
                                                            "Element");
                signedParts.add(wep);
            }
           
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                WSEncryptionPart wep = new WSEncryptionPart("cid:Attachments", "Element");
                signedParts.add(wep);
            }
        }
View Full Code Here

                WSEncryptionPart wep = new WSEncryptionPart(head.getName(),
                                                            head.getNamespace(),
                                                            "Element");
                signedParts.add(wep);
            }
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                String modifier = "Element";
                if (attachments.isContentSignatureTransform()) {
                    modifier = "Content";
                }
                WSEncryptionPart wep = new WSEncryptionPart("cid:Attachments", modifier);
                signedParts.add(wep);
            }
View Full Code Here

                QName qname = new QName(head.getNamespace(), localName);
                SecurePart securePart = new SecurePart(qname, Modifier.Element);
                securePart.setRequired(false);
                signedParts.add(securePart);
            }
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                Modifier modifier = Modifier.Element;
                if (attachments.isContentSignatureTransform()) {
                    modifier = Modifier.Content;
                }
                SecurePart securePart = new SecurePart("cid:Attachments", modifier);
                securePart.setRequired(false);
                signedParts.add(securePart);
View Full Code Here

                SecurePart securePart = new SecurePart(qname, Modifier.Element);
                securePart.setRequired(false);
                encryptedParts.add(securePart);
            }
           
            Attachments attachments = parts.getAttachments();
            if (attachments != null) {
                SecurePart securePart = new SecurePart("cid:Attachments", Modifier.Element);
                securePart.setRequired(false);
                encryptedParts.add(securePart);
            }
View Full Code Here

TOP

Related Classes of org.apache.wss4j.policy.model.Attachments

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.