Examples of containsReference()


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

                    principal.setLabel(dkt.getLabel());
                    principal.setLength(dkt.getLength());
                    principal.setOffset(dkt.getOffset());
                    String basetokenId = null;
                    SecurityTokenReference securityTokenReference = dkt.getSecurityTokenReference();
                    if (securityTokenReference.containsReference()) {
                        basetokenId = securityTokenReference.getReference().getURI();
                        if (basetokenId.charAt(0) == '#') {
                            basetokenId = basetokenId.substring(1);
                        }
                    } else {
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();
                } else if(str.containsKeyIdentifier()){
                  tokenId = str.getKeyIdentifierValue();
                }
            } catch (WSSecurityException 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();
                } else if(str.containsKeyIdentifier()){
                  tokenId = str.getKeyIdentifierValue();
                }
                if(tokenId == null){
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.wss4j.dom.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.wss4j.dom.message.token.SecurityTokenReference.containsReference()

        }
       
        WSSecurityEngineResult result = wsDocInfo.getResult(uri);
        if (result != null) {
            processPreviousResult(result, secRef, data, parameters);
        } 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.wss4j.dom.message.token.SecurityTokenReference.containsReference()

    ) throws WSSecurityException {
        SecurityTokenReference secRef =
            new SecurityTokenReference(strElement, data.getBSPEnforcer());
       
        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.wss4j.dom.message.token.SecurityTokenReference.containsReference()

           
            if (secretKey == null) {
                throw new WSSecurityException(
                    WSSecurityException.ErrorCode.FAILED_CHECK, "unsupportedKeyId", uri);
            }
        } else if (secRef.containsReference()) {
            Reference reference = secRef.getReference();
            // Try asking the CallbackHandler for the secret key
            secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data);
            if (secretKey == null) {
                Element token =
View Full Code Here

Examples of org.apache.wss4j.dom.message.token.SecurityTokenReference.containsReference()

        Crypto crypto = data.getDecCrypto();
        SecurityTokenReference secRef =
            new SecurityTokenReference(strElement, data.getBSPEnforcer());
       
        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.wss4j.dom.message.token.SecurityTokenReference.containsReference()

        }
       
        WSSecurityEngineResult result = wsDocInfo.getResult(uri);
        if (result != null) {
            processPreviousResult(result, secRef, data, wsDocInfo);
        } else if (secRef.containsReference()) {
            // Now use the callback and get it
            secretKey =
                getSecretKeyFromToken(uri, null, WSPasswordCallback.Usage.SECURITY_CONTEXT_TOKEN, data);
            if (secretKey == null) {
                throw new WSSecurityException(
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.