Package org.apache.ws.security.policy.model

Examples of org.apache.ws.security.policy.model.SignedEncryptedParts


        WSS4JSupportingToken wst = new WSS4JSupportingToken();

        /*
         * Get and store the parts to sign of the supporting token
         */
        SignedEncryptedParts sep = suppToken.getSignedParts();
        if (sep != null) {
            it = sep.getHeaders().iterator();
            if (wst.sigParts == null) {
                wst.sigParts = new ArrayList();
            }
            while (it.hasNext()) {
                Header header = (Header) it.next();
                wst.sigParts.add(new WSEncryptionPart(header.getName(), header
                        .getNamespace(), "Content"));
            }
        }
        /*
         * Get and store the parts to encrypt of the supporting token
         */
        sep = suppToken.getEncryptedParts();
        if (sep != null) {
            it = sep.getHeaders().iterator();
            if (wst.encParts == null) {
                wst.encParts = new ArrayList();
            }
            while (it.hasNext()) {
                Header header = (Header) it.next();
View Full Code Here


                    wss11found = true;
                    Wss11 wss11 = (Wss11)ped;
                    assertEquals("Signature confirmation must be true", true,
                            wss11.isRequireSignatureConfirmation());
                } else if(ped instanceof SignedEncryptedParts) {
                    SignedEncryptedParts parts = (SignedEncryptedParts)ped;
                    if(parts.isSignedParts()) {
                        signedPartsFound = true;
                        assertEquals(
                                "Incorrect number of headers in SignedParts",
                                2, parts.getHeaders().size());
                    } else {
                        encryptedPartsFound = true;
                        assertEquals(
                                "Incorrect number of headers in EncryptedParts",
                                1, parts.getHeaders().size());
                    }
                }
            }
            assertTrue("SignedParts missing", signedPartsFound);
            assertTrue("EncryptedParts missing", encryptedPartsFound);
View Full Code Here

                    wss11found = true;
                    Wss11 wss11 = (Wss11)ped;
                    assertEquals("Signature confirmation must be true", true,
                            wss11.isRequireSignatureConfirmation());
                } else if(ped instanceof SignedEncryptedParts) {
                    SignedEncryptedParts parts = (SignedEncryptedParts)ped;
                    if(parts.isSignedParts()) {
                        signedPartsFound = true;
                        assertEquals(
                                "Incorrect number of headers in SignedParts",
                                2, parts.getHeaders().size());
                    } else {
                        encryptedPartsFound = true;
                        assertEquals(
                                "Incorrect number of headers in EncryptedParts",
                                1, parts.getHeaders().size());
                    }
                }
            }
            assertTrue("SignedParts missing", signedPartsFound);
            assertTrue("EncryptedParts missing", encryptedPartsFound);
View Full Code Here

    case SecurityProcessorContext.START:
      if (!initializedSignedParts) {
        try {
          initializeSignedParts(spt);
                    SignedEncryptedParts parts = (SignedEncryptedParts) spc
                            .readCurrentPolicyEngineData();
                    PolicyEngineData parent = spc
                            .readPreviousPolicyEngineData();
                    if (parent instanceof SupportingToken) {
                        // Parent is a supporting token
View Full Code Here

    case SecurityProcessorContext.START:
      if (!initializedEncryptedParts) {
        try {
          initializeEncryptedParts(spt);
                    SignedEncryptedParts parts = (SignedEncryptedParts) spc
                            .readCurrentPolicyEngineData();
                    PolicyEngineData parent = spc.readPreviousPolicyEngineData();
                    if(parent instanceof SupportingToken) {
                        //Parent is a supporting token
                        ((SupportingToken)parent).setEncryptedParts(parts);
View Full Code Here

TOP

Related Classes of org.apache.ws.security.policy.model.SignedEncryptedParts

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.