Package org.apache.ws.secpolicy.model

Examples of org.apache.ws.secpolicy.model.SignedEncryptedParts


        if(!rmd.isInitiator()) {
                       
            //Just an indicator for EndorsingSupportingToken signature
            SupportingToken endSupportingToken = rpd.getEndorsingSupportingTokens();
            if(endSupportingToken !=  null) {
                SignedEncryptedParts endSignedParts = endSupportingToken.getSignedParts();
                if((endSignedParts != null &&
                        (endSignedParts.isBody() ||
                                endSignedParts.getHeaders().size() > 0)) ||
                                rpd.isIncludeTimestamp()) {
                    signatureParts.add(
                            new WSEncryptionPart("EndorsingSupportingTokens"));
                }
            }
            //Just an indicator for SignedEndorsingSupportingToken signature
            SupportingToken sgndEndSupportingToken = rpd.getSignedEndorsingSupportingTokens();
            if(sgndEndSupportingToken != null) {
                SignedEncryptedParts sgndEndSignedParts = sgndEndSupportingToken.getSignedParts();
                if((sgndEndSignedParts != null &&
                        (sgndEndSignedParts.isBody() ||
                                sgndEndSignedParts.getHeaders().size() > 0)) ||
                                rpd.isIncludeTimestamp()) {
                    signatureParts.add(
                            new WSEncryptionPart("SignedEndorsingSupportingTokens"));
                }
            }
View Full Code Here


                    sgndEndSuppTokens.getTokens().size() > 0) {
               
                log.debug("Processing endorsing signed supporting tokens");
               
                ArrayList tokens = sgndEndSuppTokens.getTokens();
                SignedEncryptedParts signdParts = sgndEndSuppTokens.getSignedParts();
                for (Iterator iter = tokens.iterator(); iter.hasNext();) {
                    Token token = (Token) iter.next();
                    if(token instanceof IssuedToken && rmd.isInitiator()) {
                        signatureValues.add(doIssuedTokenSignature(rmd, token, signdParts));
                    } else if(token instanceof X509Token) {
                        signatureValues.add(doX509TokenSignature(rmd, token, signdParts));
                    }
                }
            }
   
            SupportingToken endSupptokens = rpd.getEndorsingSupportingTokens();
            if(endSupptokens != null && endSupptokens.getTokens() != null &&
                    endSupptokens.getTokens().size() > 0) {
                log.debug("Processing endorsing supporting tokens");
                ArrayList tokens = endSupptokens.getTokens();
                SignedEncryptedParts signdParts = endSupptokens.getSignedParts();
                for (Iterator iter = tokens.iterator(); iter.hasNext();) {
                    Token token = (Token) iter.next();
                    if(token instanceof IssuedToken && rmd.isInitiator()){
                        signatureValues.add(doIssuedTokenSignature(rmd, token, signdParts));
                    } else if(token instanceof X509Token) {
View Full Code Here

import org.apache.ws.secpolicy.model.SignedEncryptedParts;

public class SignedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(true, SPConstants.SP_V12);
       
        for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
            processElement((OMElement) iterator.next(), signedEncryptedParts);
        }
       
View Full Code Here

import org.apache.ws.secpolicy.model.SignedEncryptedParts;

public class SignedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(true, SPConstants.SP_V11);
       
        for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
            processElement((OMElement) iterator.next(), signedEncryptedParts);
        }
       
View Full Code Here

public class EncryptedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
       
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, SPConstants.SP_V11);
       
        for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
            processElement((OMElement) iterator.next(), signedEncryptedParts);
        }
       
View Full Code Here

public class EncryptedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
       
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, SPConstants.SP_V12);
       
        for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
            processElement((OMElement) iterator.next(), signedEncryptedParts);
        }
       
View Full Code Here

                    sgndEndSuppTokens.getTokens().size() > 0) {

                log.debug("Processing endorsing signed supporting tokens");

                ArrayList tokens = sgndEndSuppTokens.getTokens();
                SignedEncryptedParts signdParts = sgndEndSuppTokens.getSignedParts();
                for (Iterator iter = tokens.iterator(); iter.hasNext();) {
                    Token token = (Token) iter.next();
                    if(token instanceof IssuedToken && rmd.isInitiator()) {
                        signatureValues.add(doIssuedTokenSignature(rmd, token, signdParts));
                    } else if(token instanceof X509Token) {
                        signatureValues.add(doX509TokenSignature(rmd, token, signdParts));
                    }
                }
            }
   
            SupportingToken endSupptokens = rpd.getEndorsingSupportingTokens();
            if(endSupptokens != null && endSupptokens.getTokens() != null &&
                    endSupptokens.getTokens().size() > 0) {
                log.debug("Processing endorsing supporting tokens");
                ArrayList tokens = endSupptokens.getTokens();
                SignedEncryptedParts signdParts = endSupptokens.getSignedParts();
                for (Iterator iter = tokens.iterator(); iter.hasNext();) {
                    Token token = (Token) iter.next();
                    if(token instanceof IssuedToken && rmd.isInitiator()){
                        signatureValues.add(doIssuedTokenSignature(rmd, token, signdParts));
                    } else if(token instanceof X509Token) {
View Full Code Here

public class EncryptedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
       
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, SPConstants.SP_V11);
       
        Iterator iterator = element.getChildElements();
    if (iterator.hasNext()) {
      for (; iterator.hasNext();) {
        processElement((OMElement) iterator.next(),
            signedEncryptedParts);
      }
    } else {
      // If we have only <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
      // then we need to encrypt the whole body (refer to http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/ws-securitypolicy-1.2-spec-os.html#_Toc161826515).
      signedEncryptedParts.setBody(true);
    }
       
        return signedEncryptedParts;
    }
View Full Code Here

public class EncryptedPartsBuilder implements AssertionBuilder {
       
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
       
        SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, SPConstants.SP_V12);
       
        Iterator iterator = element.getChildElements();
    if (iterator.hasNext()) {
      for (; iterator.hasNext();) {
        processElement((OMElement) iterator.next(),
            signedEncryptedParts);
      }
    } else {
      // If we have only <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
      // then we need to encrypt the whole body (refer to http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/ws-securitypolicy-1.2-spec-os.html#_Toc161826515).
      signedEncryptedParts.setBody(true);
    }
       
        return signedEncryptedParts;
    }
View Full Code Here


  public void doAssertionLoad(boolean behaviorCompleted) {
    if (behaviorCompleted == true && this.assertion != null) {
      if (this.assertion instanceof SignedEncryptedParts) {
        SignedEncryptedParts seParts = (SignedEncryptedParts) this.assertion;
        seParts.setBody(true);
      }
    }
    handleSuccessor(this.root);
  }
View Full Code Here

TOP

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