Examples of containsReference()


Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

        }
       
        SecurityTokenReference secRef = new SecurityTokenReference(strElement, bspCompliant);
       
        String uri = null;
        if (secRef.containsReference()) {
            uri = secRef.getReference().getURI();
            if (uri.charAt(0) == '#') {
                uri = uri.substring(1);
            }
        } else if (secRef.containsKeyIdentifier()) {
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

            Element elem = (Element)(new StAXOMBuilder(new OMDOMFactory(),
                    strElem.getXMLStreamReader()).getDocumentElement());
           
            try {
                SecurityTokenReference str = new SecurityTokenReference((Element)elem);
                if (str.containsReference()) {
                    tokenId = str.getReference().getURI();
                }
            } catch (WSSecurityException e) {
                throw new TrustException("errorExtractingTokenId",e);
            }
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

            Element elem = (Element)(new StAXOMBuilder(new OMDOMFactory(),
                    strElem.getXMLStreamReader()).getDocumentElement());
           
            try {
                SecurityTokenReference str = new SecurityTokenReference((Element)elem);
                if (str.containsReference()) {
                    tokenId = str.getReference().getURI();
                }
            } catch (WSSecurityException e) {
                throw new TrustException("errorExtractingTokenId",e);
            }     
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

                        DerivedKeyInfo dkInfo = new DerivedKeyInfo(dkToken);
                        dkcbHandler.addDerivedKey(uuid, dkInfo);
                    } else { ///i.e. dkToken has a STR
                        SecurityTokenReference str2Base =
                            dkToken.getSecuityTokenReference();
                        if (str2Base.containsReference()) {
                            Reference ref2Base = str2Base.getReference();

                            if (ref2Base
                                .getValueType()
                                .equals("http://docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-token-profile-1.0#SAMLAssertionID")) {
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

                                  * Her we get some information about the document that is being processed,
                                  * in partucular the crypto implementation, and already detected BST that
                                  * may be used later during dereferencing.
                                  */
        WSDocInfo wsDocInfo = WSDocInfoStore.lookup(docHash);
        if (secRef.containsReference()) {
            Element token =
                secRef.getTokenElement(sig.getDocument(), wsDocInfo);
            /* check token type: We support Derivedkey tokens now.
             * We will support security context tokens.
             */
 
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

            dkInfo = new DerivedKeyInfo(dkToken);
            dkcbHandler.addDerivedKey(uuid, dkInfo);
          } else { ///i.e. dkToken has a STR
            SecurityTokenReference str2Base =
              dkToken.getSecuityTokenReference();
            if (str2Base.containsReference()) {
              Reference ref2Base = str2Base.getReference();
                          //TODO:: Find where can I find the constants.
              if (ref2Base
                .getValueType()
                .equals("http://docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-token-profile-1.0#SAMLAssertionID")) {
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

    ) throws WSSecurityException {

        SecurityTokenReference secRef = new SecurityTokenReference(secRefToken);
        byte[] decryptedData = null;

        if (secRef.containsReference()) {
            Reference reference = secRef.getReference();
            String uri = reference.getURI();
            String id = uri;
            if (id.charAt(0) == '#') {
                id = id.substring(1);
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

        // Here we get some information about the document that is being
        // processed, in particular the crypto implementation, and already
        // detected BST that may be used later during dereferencing.
        //
        String uri = null;
        if (secRef.containsReference()) {
            uri = secRef.getReference().getURI();
            if (uri.charAt(0) == '#') {
                uri = uri.substring(1);
            }
            referenceType = REFERENCE_TYPE.DIRECT_REF;
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

        }
       
        WSSecurityEngineResult result = wsDocInfo.getResult(uri);
        if (result != null) {
            processPreviousResult(result, secRef, data, parameters, bspCompliant);
        } else if (secRef.containsReference()) {
            Reference reference = secRef.getReference();
            // Try asking the CallbackHandler for the secret key
            secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data);
            principal = new CustomTokenPrincipal(uri);
           
View Full Code Here

Examples of org.apache.ws.security.message.token.SecurityTokenReference.containsReference()

                    cert = certs[0];
                    if (log.isDebugEnabled()) {
                        log.debug("cert: " + certs[0]);
                        log.debug("KeyIdentifier Alias: " + alias);
                    }
                } else if (secRef.containsReference()) {
                    Element bstElement = secRef.getTokenElement(doc, null, cb);

                    // at this point ... check token type: Binary
                    QName el =
                        new QName(bstElement.getNamespaceURI(), bstElement.getLocalName());
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.