Package org.apache.ws.sandbox.security.conversation.message.token

Examples of org.apache.ws.sandbox.security.conversation.message.token.SecurityContextToken


     * @param doc
     */
    public RequestedSecurityToken(Document doc, boolean generateChildren) throws Exception {
        this(doc);
        if (generateChildren) {
            this.sct = new SecurityContextToken(doc);
            this.element.appendChild(sct.getElement());

        }
    }
View Full Code Here


        if (!parseChildElements) {
            return;
        }

        this.sct =
                new SecurityContextToken((Element) WSSecurityUtil.getDirectChild(//elem.getOwnerDocument(),
                        elem,
                        SecurityContextToken.TOKEN.getLocalPart(),
                        SecurityContextToken.TOKEN.getNamespaceURI()));

    }
View Full Code Here

                    handleReferenceList((Element) elem, dkcbHandler);
                for (int j = 0; j < tmpVec.size(); j++) {
                    returnResults.add(tmpVec.get(j));
                }
            } else if (el.equals(SCT)) {
                SecurityContextToken sct =
                    new SecurityContextToken((Element) elem);
                String uuid = sct.getIdentifier();
                ConvEngineResult convResult =
                    new ConvEngineResult(ConvEngineResult.SCT);
                convResult.setUuid(uuid);
                returnResults.add(convResult);
            }
View Full Code Here

            }

            //Now trust is verified.

            stRes = new RequestSecurityTokenResponse(eleSTRes, true);
            SecurityContextToken SCT =
                stRes.getRequestedSecurityToken().getSct();
            uuid = SCT.getIdentifier();
            RequestedProofToken proofToken = stRes.getRequestedProofToken();
            //TODO:: romove the hard coded decryption

            proofToken.doDecryption(callback, this.loadDecryptionCrypto());
View Full Code Here

                DerivedKeyToken dkToken = null;
                try {
                    dkToken = new DerivedKeyToken(ele)//Cover the 'Element' into 'DerivedKeyToken' object
                    if (dkToken.getSecuityTokenReference() == null) {
                        //if dkToken doesn't have a STR find a SecurityContextToken in the SOAP Envelope
                        SecurityContextToken secContextTk =
                            ConversationUtil.getSCT(dkToken);
                        uuid = secContextTk.getIdentifier();
                        log.debug(
                            "ConversationEngine :: The uuid is found " + uuid);
                        DerivedKeyInfo dkInfo = new DerivedKeyInfo(dkToken);
                        dkcbHandler.addDerivedKey(uuid, dkInfo);
                    } else { ///i.e. dkToken has a STR
View Full Code Here

        String uuid = null;

                try {
          if (dkToken.getSecuityTokenReference() == null) {
            //if dkToken doesn't have a STR
            SecurityContextToken secContextTk =
              ConversationUtil.getSCT(dkToken);
            uuid = secContextTk.getIdentifier();
            log.debug(
              "ConversationEngine :: The uuid is found " + uuid);
            dkInfo = new DerivedKeyInfo(dkToken);
            dkcbHandler.addDerivedKey(uuid, dkInfo);
          } else { ///i.e. dkToken has a STR
View Full Code Here

        if (ndList.getLength() == 0) {
            throw new ConversationException("Cannot find SCT");
        }
        try {
            Element ele = (Element) ndList.item(0);
            SecurityContextToken sct = new SecurityContextToken(ele);
            return sct;
        } catch (WSSecurityException e) {
            //e.printStackTrace();
            throw new ConversationException(e.getMessage());
        }
View Full Code Here

                    handleReferenceList((Element) elem, dkcbHandler);
                for (int j = 0; j < tmpVec.size(); j++) {
                    returnResults.add(tmpVec.get(j));
                }
            } else if (el.equals(SCT)) {
                SecurityContextToken sct =
                    new SecurityContextToken((Element) elem);
                String uuid = sct.getIdentifier();
                ConvEngineResult convResult =
                    new ConvEngineResult(ConvEngineResult.SCT);
                convResult.setUuid(uuid);
                returnResults.add(convResult);
            }
View Full Code Here

            }

            //Now trust is verified.

            stRes = new RequestSecurityTokenResponse(eleSTRes, true);
            SecurityContextToken SCT =
                stRes.getRequestedSecurityToken().getSct();
            uuid = SCT.getIdentifier();
            RequestedProofToken proofToken = stRes.getRequestedProofToken();
            //TODO:: romove the hard coded decryption

            proofToken.doDecryption(callback, this.loadDecryptionCrypto());
View Full Code Here

                        doc.getDocumentElement(),
                        true);
                WSSecurityUtil.appendChildElement(
                    doc,
                    securityHeader,
                    (new SecurityContextToken(doc, uuid)).getElement());
                ConversationManager manager = new ConversationManager();
                for (int i = 0; i < this.actionsInt.length; i++) {
                    // Derrive the token
                    DerivedKeyInfo dkInfo =
                        manager.createDerivedKeyToken(doc, uuid, dkcbHandler,null, keyLen);
View Full Code Here

TOP

Related Classes of org.apache.ws.sandbox.security.conversation.message.token.SecurityContextToken

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.