Package org.apache.ws.secpolicy.model

Examples of org.apache.ws.secpolicy.model.HttpsToken


        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimtiveAssertion primtive = (XmlPrimtiveAssertion) iterator.next();
            QName qname = primtive.getName();
           
            if (SP12Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V12);
               
                OMElement element = primtive.getValue().getFirstChildWithName(SPConstants.POLICY);
               
                if (element != null) {

                    if (element.getFirstChildWithName(SP12Constants.REQUIRE_CLIENT_CERTIFICATE) != null) {
                        httpsToken.setRequireClientCertificate(true);
                    }
                }
               
                parent.setToken(httpsToken);
            }
View Full Code Here


   
    /**
     * {@inheritDoc}
     */
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V12);

        if (element.getFirstElement()!= null) {
            Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
            policy = (Policy) policy.normalize(false);

View Full Code Here

        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            Assertion primtive = (Assertion) iterator.next();
            QName qname = primtive.getName();
           
            if (SP11Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V11);
                String attr = ((PrimitiveAssertion)primtive).getAttribute(SPConstants.REQUIRE_CLIENT_CERTIFICATE);
                if(attr != null) {
                    httpsToken.setRequireClientCertificate("true".equals(attr));
                }
                parent.setToken(httpsToken);
            }
        }
    }
View Full Code Here

   
    /**
     * {@inheritDoc}
     */
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V12);
       
        Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
        policy = (Policy) policy.normalize(false);
       
        for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {
View Full Code Here

        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimtiveAssertion primtive = (XmlPrimtiveAssertion) iterator.next();
            QName qname = primtive.getName();
           
            if (SP12Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V12);
               
                OMElement element = primtive.getValue().getFirstChildWithName(SPConstants.POLICY);
               
                if (element != null) {
                    OMElement child = element.getFirstElement();
                    if (child != null) {
                        if (SP12Constants.HTTP_BASIC_AUTHENTICATION.equals(child.getQName())) {
                            httpsToken.setHttpBasicAuthentication(true);
                        } else if (SP12Constants.HTTP_DIGEST_AUTHENTICATION.equals(child.getQName())) {
                            httpsToken.setHttpDigestAuthentication(true);
                        } else if (SP12Constants.REQUIRE_CLIENT_CERTIFICATE.equals(child.getQName())) {
                            httpsToken.setRequireClientCertificate(true);
                        }
                    }
                }
               
                parent.setToken(httpsToken);
View Full Code Here

        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimtiveAssertion primtive = (XmlPrimtiveAssertion) iterator.next();
            QName qname = primtive.getName();
           
            if (SP11Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V11);
                OMAttribute attr = primtive.getValue().getAttribute(SPConstants.REQUIRE_CLIENT_CERTIFICATE);
                if(attr != null) {
                    httpsToken.setRequireClientCertificate("true".equals(attr.getAttributeValue()));
                }
                parent.setToken(httpsToken);
            }
        }
    }
View Full Code Here

        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimtiveAssertion primtive = (XmlPrimtiveAssertion) iterator.next();
            QName qname = primtive.getName();
           
            if (Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken();
                OMAttribute attr = primtive.getValue().getAttribute(Constants.REQUIRE_CLIENT_CERTIFICATE);
                if(attr != null) {
                    httpsToken.setRequireClientCertificate("true".equals(attr.getAttributeValue()));
                }
                parent.setToken(httpsToken);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.secpolicy.model.HttpsToken

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.