Package org.apache.cxf.ws.security.policy.model

Examples of org.apache.cxf.ws.security.policy.model.KerberosToken


        KerberosSecurity kerberosToken
    ) {
        Collection<AssertionInfo> krbAis = aim.get(SP12Constants.KERBEROS_TOKEN);
        if (krbAis != null && !krbAis.isEmpty()) {
            for (AssertionInfo ai : krbAis) {
                KerberosToken kerberosTokenPolicy = (KerberosToken)ai.getAssertion();
                ai.setAsserted(true);
               
                if (!isTokenRequired(kerberosTokenPolicy, message)) {
                    continue;
                }
View Full Code Here


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

        KerberosToken kerberosToken = new KerberosToken(consts);
        kerberosToken.setOptional(PolicyConstants.isOptional(element));
        kerberosToken.setIgnorable(PolicyConstants.isIgnorable(element));

        String attribute = element.getAttributeNS(element.getNamespaceURI(), SPConstants.ATTR_INCLUDE_TOKEN);
        if (attribute != null) {
            kerberosToken.setInclusion(consts.getInclusionFromAttributeValue(attribute));
        }
       
        Element child = DOMUtils.getFirstElement(element);
        while (child != null) {
            String ln = child.getLocalName();
            if (org.apache.neethi.Constants.ELEM_POLICY.equals(ln)) {
                NodeList policyChildren = child.getChildNodes();
                if (policyChildren != null) {
                    for (int i = 0; i < policyChildren.getLength(); i++) {
                        Node policyChild = policyChildren.item(i);
                        if (policyChild instanceof Element) {
                            QName qname =
                                new QName(policyChild.getNamespaceURI(), policyChild.getLocalName());
                            String localpart = qname.getLocalPart();
                            if (SPConstants.KERBEROS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setV5ApReqToken11(true);
                            } else if (SPConstants.KERBEROS_GSS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setGssV5ApReqToken11(true);
                            } else if (SPConstants.REQUIRE_DERIVED_KEYS.equals(localpart)) {
                                kerberosToken.setDerivedKeys(true);
                            }
                        }
                    }
                }
            }
View Full Code Here

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

        KerberosToken kerberosToken = new KerberosToken(consts);
        kerberosToken.setOptional(PolicyConstants.isOptional(element));
        kerberosToken.setIgnorable(PolicyConstants.isIgnorable(element));

        String attribute = element.getAttributeNS(element.getNamespaceURI(), SPConstants.ATTR_INCLUDE_TOKEN);
        if (attribute != null) {
            kerberosToken.setInclusion(consts.getInclusionFromAttributeValue(attribute));
        }
       
        Element child = DOMUtils.getFirstElement(element);
        while (child != null) {
            String ln = child.getLocalName();
            if (org.apache.neethi.Constants.ELEM_POLICY.equals(ln)) {
                NodeList policyChildren = child.getChildNodes();
                if (policyChildren != null) {
                    for (int i = 0; i < policyChildren.getLength(); i++) {
                        Node policyChild = policyChildren.item(i);
                        if (policyChild instanceof Element) {
                            QName qname =
                                new QName(policyChild.getNamespaceURI(), policyChild.getLocalName());
                            String localpart = qname.getLocalPart();
                            if (SPConstants.KERBEROS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setV5ApReqToken11(true);
                            } else if (SPConstants.KERBEROS_GSS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setGssV5ApReqToken11(true);
                            }
                        }
                    }
                }
            }
View Full Code Here

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

        KerberosToken kerberosToken = new KerberosToken(consts);
        kerberosToken.setOptional(PolicyConstants.isOptional(element));
        kerberosToken.setIgnorable(PolicyConstants.isIgnorable(element));

        String attribute = element.getAttributeNS(element.getNamespaceURI(), SPConstants.ATTR_INCLUDE_TOKEN);
        if (attribute != null) {
            kerberosToken.setInclusion(consts.getInclusionFromAttributeValue(attribute.trim()));
        }
       
        Element child = DOMUtils.getFirstElement(element);
        boolean foundPolicy = false;
        while (child != null) {
            String ln = child.getLocalName();
            if (org.apache.neethi.Constants.ELEM_POLICY.equals(ln)) {
                foundPolicy = true;
                kerberosToken.setPolicy(child);
                NodeList policyChildren = child.getChildNodes();
                if (policyChildren != null) {
                    for (int i = 0; i < policyChildren.getLength(); i++) {
                        Node policyChild = policyChildren.item(i);
                        if (policyChild instanceof Element) {
                            QName qname =
                                new QName(policyChild.getNamespaceURI(), policyChild.getLocalName());
                            String localpart = qname.getLocalPart();
                            if (SPConstants.KERBEROS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setV5ApReqToken11(true);
                            } else if (SPConstants.KERBEROS_GSS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setGssV5ApReqToken11(true);
                            } else if (SPConstants.REQUIRE_DERIVED_KEYS.equals(localpart)) {
                                kerberosToken.setDerivedKeys(true);
                            }
                        }
                    }
                }
            }
View Full Code Here

        KerberosSecurity kerberosToken
    ) {
        Collection<AssertionInfo> krbAis = aim.get(SP12Constants.KERBEROS_TOKEN);
        if (krbAis != null && !krbAis.isEmpty()) {
            for (AssertionInfo ai : krbAis) {
                KerberosToken kerberosTokenPolicy = (KerberosToken)ai.getAssertion();
                ai.setAsserted(true);
               
                if (!isTokenRequired(kerberosTokenPolicy, message)) {
                    continue;
                }
View Full Code Here

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

        KerberosToken kerberosToken = new KerberosToken(consts);
        kerberosToken.setOptional(PolicyConstants.isOptional(element));
        kerberosToken.setIgnorable(PolicyConstants.isIgnorable(element));

        String attribute = element.getAttributeNS(element.getNamespaceURI(), SPConstants.ATTR_INCLUDE_TOKEN);
        if (attribute != null) {
            kerberosToken.setInclusion(consts.getInclusionFromAttributeValue(attribute.trim()));
        }
       
        Element child = DOMUtils.getFirstElement(element);
        boolean foundPolicy = false;
        while (child != null) {
            String ln = child.getLocalName();
            if (org.apache.neethi.Constants.ELEM_POLICY.equals(ln)) {
                foundPolicy = true;
                NodeList policyChildren = child.getChildNodes();
                if (policyChildren != null) {
                    for (int i = 0; i < policyChildren.getLength(); i++) {
                        Node policyChild = policyChildren.item(i);
                        if (policyChild instanceof Element) {
                            QName qname =
                                new QName(policyChild.getNamespaceURI(), policyChild.getLocalName());
                            String localpart = qname.getLocalPart();
                            if (SPConstants.KERBEROS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setV5ApReqToken11(true);
                            } else if (SPConstants.KERBEROS_GSS_V5_AP_REQ_TOKEN_11.equals(localpart)) {
                                kerberosToken.setGssV5ApReqToken11(true);
                            } else if (SPConstants.REQUIRE_DERIVED_KEYS.equals(localpart)) {
                                kerberosToken.setDerivedKeys(true);
                            }
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.security.policy.model.KerberosToken

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.