Examples of SPConstants


Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
       
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

       
        TransportToken transportToken = new TransportToken(consts, builder);
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

        return new QName[]{SP11Constants.SPNEGO_CONTEXT_TOKEN, SP12Constants.SPNEGO_CONTEXT_TOKEN};
    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
                ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;
       
        SpnegoContextToken spnegoContextToken = new SpnegoContextToken(consts);
        spnegoContextToken.setOptional(PolicyConstants.isOptional(element));
        spnegoContextToken.setIgnorable(PolicyConstants.isIgnorable(element));
       
        String attribute = DOMUtils.getAttribute(element, consts.getIncludeToken());
        if (attribute == null) {
            throw new IllegalArgumentException("SpnegoContextToken doesn't contain "
                                               + "any sp:IncludeToken attribute");
        }

        String inclusionValue = attribute.trim();

        spnegoContextToken.setInclusion(consts.getInclusionFromAttributeValue(inclusionValue));

        Element elem = DOMUtils.getFirstElement(element);
        while (elem != null) {
            QName qn = DOMUtils.getElementQName(elem);
            if (Constants.isPolicyElement(qn)) {
                if (DOMUtils.getFirstChildWithName(elem, consts.getNamespace(),
                        SPConstants.REQUIRE_DERIVED_KEYS) != null) {
                    spnegoContextToken.setDerivedKeys(true);
                } else if (DOMUtils.getFirstChildWithName(elem,
                        SP12Constants.REQUIRE_IMPLIED_DERIVED_KEYS) != null) {
                    spnegoContextToken.setImpliedDerivedKeys(true);
                } else if (DOMUtils.getFirstChildWithName(elem,
                        SP12Constants.REQUIRE_EXPLICIT_DERIVED_KEYS) != null) {
                    spnegoContextToken.setExplicitDerivedKeys(true);
                }
            } else if (consts.getNamespace().equals(qn.getNamespaceURI())
                    && SPConstants.ISSUER.equals(qn.getLocalPart())) {
                spnegoContextToken.setIssuerEpr(DOMUtils.getFirstElement(elem));
            }
            elem = DOMUtils.getNextElement(elem);
        }
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
       
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

        TransportBinding transportBinding = new TransportBinding(consts, builder);
        processAlternative(element, transportBinding, consts, factory);
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
       
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

        RecipientSignatureToken recipientSignatureToken = new RecipientSignatureToken(consts, builder);
        recipientSignatureToken.setOptional(PolicyConstants.isOptional(element));
        recipientSignatureToken.setIgnorable(PolicyConstants.isIgnorable(element));
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
       
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

        InitiatorToken initiatorToken = new InitiatorToken(consts, builder);
        initiatorToken.setOptional(PolicyConstants.isOptional(element));
        initiatorToken.setIgnorable(PolicyConstants.isIgnorable(element));
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

        return new QName[]{SP11Constants.PROTECTION_TOKEN, SP12Constants.PROTECTION_TOKEN};
    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;
       
       
        ProtectionToken protectionToken = new ProtectionToken(consts, builder);
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {

        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

       
        AsymmetricBinding asymmetricBinding = new AsymmetricBinding(consts, builder);
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {
       
        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

        RecipientEncryptionToken recipientEncryptionToken = new RecipientEncryptionToken(consts, builder);
        recipientEncryptionToken.setOptional(PolicyConstants.isOptional(element));
        recipientEncryptionToken.setIgnorable(PolicyConstants.isIgnorable(element));
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }

    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {

        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;
       
       
        SecureConversationToken conversationToken = new SecureConversationToken(consts);
        conversationToken.setOptional(PolicyConstants.isOptional(element));
        conversationToken.setIgnorable(PolicyConstants.isIgnorable(element));

        String attribute = DOMUtils.getAttribute(element, consts.getIncludeToken());
        if (attribute == null) {
            throw new IllegalArgumentException("SecureConversationToken doesn't contain "
                                               + "any sp:IncludeToken attribute");
        }

        String inclusionValue = attribute.trim();

        conversationToken.setInclusion(consts.getInclusionFromAttributeValue(inclusionValue));

       
        Element elem = DOMUtils.getFirstElement(element);
        while (elem != null) {
            QName qn = DOMUtils.getElementQName(elem);
            if (Constants.isPolicyElement(qn)) {
                if (DOMUtils.getFirstChildWithName(elem,
                                                   consts.getNamespace(),
                                                   SPConstants.REQUIRE_DERIVED_KEYS) != null) {
                    conversationToken.setDerivedKeys(true);
                } else if (DOMUtils.getFirstChildWithName(elem,
                                                          SP12Constants
                                                              .REQUIRE_IMPLIED_DERIVED_KEYS)
                                                          != null) {
                    conversationToken.setImpliedDerivedKeys(true);
                } else if (DOMUtils.getFirstChildWithName(elem,
                                                          SP12Constants
                                                              .REQUIRE_EXPLICIT_DERIVED_KEYS)
                                                              != null) {
                    conversationToken.setExplicitDerivedKeys(true);
                }


                if (DOMUtils.getFirstChildWithName(elem,
                                                   consts.getNamespace(),
                                                   SPConstants.REQUIRE_EXTERNAL_URI_REFERENCE) != null) {
                    conversationToken.setRequireExternalUriRef(true);
                }

                if (DOMUtils.getFirstChildWithName(elem,
                                                   consts.getNamespace(),
                                                   SPConstants.SC10_SECURITY_CONTEXT_TOKEN) != null) {
                    conversationToken.setSc10SecurityContextToken(true);
                }
               
                if (DOMUtils.getFirstChildWithName(elem,
                        consts.getNamespace(),
                        SPConstants.SC13_SECURITY_CONTEXT_TOKEN) != null) {
                    conversationToken.setSc13SecurityContextToken(true);
                }

                Element bootstrapPolicyElement = DOMUtils.getFirstChildWithName(elem,
                                                                                consts.getNamespace(),
                                                                                SPConstants.BOOTSTRAP_POLICY);
                if (bootstrapPolicyElement != null) {
                    Policy policy = builder.getPolicy(DOMUtils.getFirstElement(bootstrapPolicyElement));
                    conversationToken.setBootstrapPolicy(policy);
                }

            } else if (consts.getNamespace().equals(qn.getNamespaceURI())
                && SPConstants.ISSUER.equals(qn.getLocalPart())) {
                conversationToken.setIssuerEpr(DOMUtils.getFirstElement(elem));               
            }
            elem = DOMUtils.getNextElement(elem);
        }
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.SPConstants

    }
   
    public Assertion build(Element element, AssertionBuilderFactory factory)
        throws IllegalArgumentException {

        SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
            ? SP11Constants.INSTANCE : SP12Constants.INSTANCE;

        SecurityContextToken contextToken = new SecurityContextToken(consts);

        String includeAttr = DOMUtils.getAttribute(element, consts.getIncludeToken());

        if (includeAttr != null) {
            contextToken.setInclusion(consts.getInclusionFromAttributeValue(includeAttr));
        }

        element = PolicyConstants.findPolicyElement(element);

        if (element != null) {

            if (DOMUtils.getFirstChildWithName(element,
                                               consts.getNamespace(),
                                               SPConstants.REQUIRE_DERIVED_KEYS) != null) {
                contextToken.setDerivedKeys(true);
            }

            if (DOMUtils.getFirstChildWithName(element,
                                               consts.getNamespace(),
                                               SPConstants.REQUIRE_EXTERNAL_URI_REFERENCE) != null) {
                contextToken.setRequireExternalUriRef(true);
            }

            if (DOMUtils.getFirstChildWithName(element,
                                               consts.getNamespace(),
                                               SPConstants.SC10_SECURITY_CONTEXT_TOKEN) != null) {
                contextToken.setSc10SecurityContextToken(true);
            }
           
            if (DOMUtils.getFirstChildWithName(element,
                    consts.getNamespace(),
                    SPConstants.SC13_SECURITY_CONTEXT_TOKEN) != null) {
                contextToken.setSc13SecurityContextToken(true);
            }
        }
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.