Package org.apache.xml.security.binding.xmlenc

Examples of org.apache.xml.security.binding.xmlenc.ReferenceType


        references = new HashMap<String, ReferenceType>(dataReferenceOrKeyReference.size() + 1); //+1 because the HashMap will resize otherwise
        processedReferences = new ArrayList<ReferenceType>(dataReferenceOrKeyReference.size());

        Iterator<JAXBElement<ReferenceType>> referenceTypeIterator = dataReferenceOrKeyReference.iterator();
        while (referenceTypeIterator.hasNext()) {
            ReferenceType referenceType = referenceTypeIterator.next().getValue();
            if (referenceType.getURI() == null) {
                throw new XMLSecurityException("stax.emptyReferenceURI");
            }
            references.put(XMLSecurityUtils.dropReferenceMarker(referenceType.getURI()), referenceType);
        }
    }
View Full Code Here


                encryptedHeader = true;
            }

            //check if the current start-element has the name EncryptedData and an Id attribute
            if (xmlSecStartElement.getName().equals(XMLSecurityConstants.TAG_xenc_EncryptedData)) {
                ReferenceType referenceType = null;
                if (references != null) {
                    referenceType = matchesReferenceId(xmlSecStartElement);
                    if (referenceType == null) {
                        //if the events were not for us (no matching reference-id the we have to replay the EncryptedHeader elements)
                        if (!tmpXmlEventList.isEmpty()) {
View Full Code Here

        references = new HashMap<String, ReferenceType>(dataReferenceOrKeyReference.size() + 1); //+1 because the HashMap will resize otherwise
        processedReferences = new ArrayList<ReferenceType>(dataReferenceOrKeyReference.size());

        Iterator<JAXBElement<ReferenceType>> referenceTypeIterator = dataReferenceOrKeyReference.iterator();
        while (referenceTypeIterator.hasNext()) {
            ReferenceType referenceType = referenceTypeIterator.next().getValue();
            if (referenceType.getURI() == null) {
                throw new XMLSecurityException("stax.emptyReferenceURI");
            }
            references.put(XMLSecurityUtils.dropReferenceMarker(referenceType.getURI()), referenceType);
        }
    }
View Full Code Here

                encryptedHeader = true;
            }

            //check if the current start-element has the name EncryptedData and an Id attribute
            if (xmlSecStartElement.getName().equals(XMLSecurityConstants.TAG_xenc_EncryptedData)) {
                ReferenceType referenceType = null;
                if (references != null) {
                    referenceType = matchesReferenceId(xmlSecStartElement);
                    if (referenceType == null) {
                        //if the events were not for us (no matching reference-id the we have to replay the EncryptedHeader elements)
                        if (!tmpXmlEventList.isEmpty()) {
View Full Code Here

        if (referenceList != null) {
            List<JAXBElement<ReferenceType>> references = referenceList.getDataReferenceOrKeyReference();
            Iterator<JAXBElement<ReferenceType>> referenceTypeIterator = references.iterator();
            while (referenceTypeIterator.hasNext()) {
                ReferenceType referenceType = referenceTypeIterator.next().getValue();
                if (!referenceType.getURI().startsWith("#")) {
                    securityContext.handleBSPRule(bspRule);
                }
            }
        }
    }
View Full Code Here

            List<ReferenceType> processedReferences = getProcessedReferences();
            if (references != null) {
                Iterator<Map.Entry<String,ReferenceType>> iterator = references.entrySet().iterator();
                while(iterator.hasNext()){
                    Map.Entry<String,ReferenceType> next = iterator.next();
                    final ReferenceType referenceType = next.getValue();
                    String uri = WSSUtils.dropReferenceMarker(referenceType.getURI());

                    Iterator<String> encryptedDataIterator = encryptedDataRefs.iterator();
                    while (encryptedDataIterator.hasNext()) {
                        String s = encryptedDataIterator.next();
                        if (s.equals(uri)) {
View Full Code Here

                        (WSInboundSecurityContext) inputProcessorChain.getSecurityContext()) {

                    @Override
                    protected ReferenceType matchesReferenceId(XMLSecStartElement xmlSecStartElement) {
                        if (xmlSecStartElement == encryptedDataElement) {
                            ReferenceType referenceType = new ReferenceType();
                            if (idAttribute != null) {
                                final String uri = idAttribute.getValue();
                                referenceType.setURI("#" + uri);
                                inputProcessorChain.getSecurityContext().putAsList(WSSConstants.PROP_ENCRYPTED_DATA_REFS, uri);
                            }
                            inputProcessorChain.removeProcessor(this);
                            return referenceType;
                        }
View Full Code Here

        if (referenceList != null) {
            List<JAXBElement<ReferenceType>> references = referenceList.getDataReferenceOrKeyReference();
            Iterator<JAXBElement<ReferenceType>> referenceTypeIterator = references.iterator();
            while (referenceTypeIterator.hasNext()) {
                ReferenceType referenceType = referenceTypeIterator.next().getValue();
                if (!referenceType.getURI().startsWith("#")) {
                    securityContext.handleBSPRule(bspRule);
                }
            }
        }
    }
View Full Code Here

            List<ReferenceType> processedReferences = getProcessedReferences();
            if (references != null) {
                Iterator<Map.Entry<String,ReferenceType>> iterator = references.entrySet().iterator();
                while(iterator.hasNext()){
                    Map.Entry<String,ReferenceType> next = iterator.next();
                    final ReferenceType referenceType = next.getValue();
                    String uri = WSSUtils.dropReferenceMarker(referenceType.getURI());

                    Iterator<String> encryptedDataIterator = encryptedDataRefs.iterator();
                    while (encryptedDataIterator.hasNext()) {
                        String s = encryptedDataIterator.next();
                        if (s.equals(uri)) {
View Full Code Here

                        (WSInboundSecurityContext) inputProcessorChain.getSecurityContext()) {

                    @Override
                    protected ReferenceType matchesReferenceId(XMLSecStartElement xmlSecStartElement) {
                        if (xmlSecStartElement == encryptedDataElement) {
                            ReferenceType referenceType = new ReferenceType();
                            if (idAttribute != null) {
                                final String uri = idAttribute.getValue();
                                referenceType.setURI("#" + uri);
                                inputProcessorChain.getSecurityContext().putAsList(WSSConstants.PROP_ENCRYPTED_DATA_REFS, uri);
                            }
                            return referenceType;
                        }
                        return null;
View Full Code Here

TOP

Related Classes of org.apache.xml.security.binding.xmlenc.ReferenceType

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.