Package org.apache.wss4j.policy.model

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


        binding.setOnlySignEntireHeadersAndBody(true);
        binding.setProtectTokens(false);
        all.addPolicyComponent(binding);
       
        List<Header> headers = new ArrayList<Header>();
        SignedParts signedParts =
            new SignedParts(SPConstants.SPVersion.SP12, true, null, headers, false);
        all.addPolicyComponent(signedParts);
       
        return p;
    }
View Full Code Here


    public List<WSEncryptionPart> getSignedParts()
        throws SOAPException {
       
        boolean isSignBody = false;
       
        SignedParts parts = null;
        SignedElements elements = null;
       
        Collection<AssertionInfo> ais = getAllAssertionsByLocalname(SPConstants.SIGNED_PARTS);
        if (!ais.isEmpty()) {
            for (AssertionInfo ai : ais) {
                parts = (SignedParts)ai.getAssertion();
                ai.setAsserted(true);
            }           
        }
       
        ais = getAllAssertionsByLocalname(SPConstants.SIGNED_ELEMENTS);
        if (!ais.isEmpty()) {
            for (AssertionInfo ai : ais) {
                elements = (SignedElements)ai.getAssertion();
                ai.setAsserted(true);
            }           
        }
       
        List<WSEncryptionPart> signedParts = new ArrayList<WSEncryptionPart>();
        if (parts != null) {
            isSignBody = parts.isBody();
            for (Header head : parts.getHeaders()) {
                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";
                }
View Full Code Here

TOP

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

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.