Examples of findOrCreateSecurityHeader()


Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

                    }
                   
                    // insert the Issued Token after the DKT
                    if (tokenElem != null) {
                        if (includeIST) {
                            secureMessage.findOrCreateSecurityHeader().insertHeaderBlockElement(tokenElem);
                        }
                        // also store the token in Packet.invocationProperties to be used by
                        // client side response processing
                        context.setIssuedSAMLToken(tokenElem);
                    }
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

                }
               
                if (tokenElem != null) {
                    if(includeIST) {

                        secureMessage.findOrCreateSecurityHeader().insertHeaderBlockElement(tokenElem);
                        nxtSiblingContainer[0] = tokenElem.getNextSibling();
                    } else {
                        nxtSiblingContainer[0] null;
                    }
                    // also store the token in Packet.invocationProperties to be used by
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

           sctBinding.INCLUDE_ALWAYS.equals(iTokenType) ||
           sctBinding.INCLUDE_ALWAYS_TO_RECIPIENT_VER2.equals(iTokenType) ||
           sctBinding.INCLUDE_ALWAYS_VER2.equals(iTokenType)) {
           
            if (!tokenInserted) {
                secureMessage.findOrCreateSecurityHeader().insertHeaderBlock(sct);
                // record the element
                sctElement = secureMessage.getElementByWsuId(sct.getWsuId());
            }
           
            DirectReference reference = new DirectReference();
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

            Node[] nxtSiblingContainer) throws XWSSecurityException{
       
        Node nextSibling = null;
        KeyInfo keyInfo = null;
        SecurableSoapMessage secureMessage = context.getSecurableSoapMessage();
        SecurityHeader securityHeader = secureMessage.findOrCreateSecurityHeader();
        WSSPolicyConsumerImpl dsigHelper = WSSPolicyConsumerImpl.getInstance();
       
        HashMap tokenCache = context.getTokenCache();
        HashMap insertedX509Cache = context.getInsertedX509Cache();
        String x509id = certInfo.getUUID();
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

                    }
                    token = new X509SecurityToken(secureMessage.getSOAPPart(),certInfo.getX509Certificate(),id, valueType);
                    tokenCache.put(id, token);
                }
                if(insertedX509Cache.get(id) == null){
                    secureMessage.findOrCreateSecurityHeader().insertHeaderBlock(token);
                    insertedX509Cache.put(id, token);
                }
                nextSibling = token.getAsSoapElement().getNextSibling();
                nxtSiblingContainer[0] = nextSibling;
                return keyInfo;
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

    @SuppressWarnings("unchecked")
    public static void encrypt(FilterProcessingContext context) throws XWSSecurityException{
       
        //TODO: support for QName and XPath
        SecurableSoapMessage secureMsg = context.getSecurableSoapMessage();
        SecurityHeader _secHeader = secureMsg.findOrCreateSecurityHeader();
       
        boolean _exportCertificate = false;
        SecretKey _symmetricKey = null;
        SecretKey  keyEncSK = null;
       
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

        if(context instanceof JAXBFilterProcessingContext){
            isOptimized = true;
            optSecHeader = ((JAXBFilterProcessingContext)context).getSecurityHeader();
        } else{
            secureMessage = context.getSecurableSoapMessage();
            securityHeader = secureMessage.findOrCreateSecurityHeader();
        }
       
        AuthenticationTokenPolicy policy =
                (AuthenticationTokenPolicy)context.getSecurityPolicy();
        AuthenticationTokenPolicy.SAMLAssertionBinding samlPolicy =
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

                String creationTime = "";
                TimestampPolicy tPolicy = (TimestampPolicy) policy.getFeatureBinding();
                creationTime = tPolicy.getCreationTime();
                token.setCreationTime(creationTime);
            }
            SecurityHeader wsseSecurity = secureMessage.findOrCreateSecurityHeader();
            String wsuId = policy.getUUID();
            if (wsuId != null && !wsuId.equals("")){
                XMLUtil.setWsuIdAttr(token.getAsSoapElement(), wsuId);
            }
            wsseSecurity.insertHeaderBlock(token);
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

            }           
                                       
            Element element = (Element)issuedToken.getTokenValue();
            SOAPElement tokenEle = XMLUtil.convertToSoapElement(soapPart, element);
            if(tokenEle != null && includeToken){
                secureMessage.findOrCreateSecurityHeader().insertHeaderBlockElement(tokenEle);           
            }
            context.setIssuedSAMLToken(tokenEle);
           
            if (null != itkb.getSTRID()) {
                String itId = issuedToken.getId();
View Full Code Here

Examples of com.sun.xml.wss.impl.SecurableSoapMessage.findOrCreateSecurityHeader()

                SecurityTokenReference tokenRef = new SecurityTokenReference(secureMessage.getSOAPPart());
                tokenRef.setWsuId(itkb.getSTRID());
               
                KeyIdentifierStrategy strat = new KeyIdentifierStrategy(itId);
                strat.insertKey(tokenRef, context.getSecurableSoapMessage());
                secureMessage.findOrCreateSecurityHeader().insertHeaderBlock(tokenRef);
            }
        }
    }
   
    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.