Search in sources :

Example 11 with IDPList

use of com.sun.identity.saml2.protocol.IDPList in project OpenAM by OpenRock.

the class ScopingImpl method parseElement.

private void parseElement(Element element) throws SAML2Exception {
    String proxyCountStr = element.getAttribute("ProxyCount");
    if (proxyCountStr != null && proxyCountStr.length() > 0) {
        proxyCount = new Integer(proxyCountStr);
        validateProxyCount(proxyCount);
    }
    NodeList nList = element.getChildNodes();
    if ((nList != null) && (nList.getLength() > 0)) {
        if (requesterIDList == null) {
            requesterIDList = new ArrayList<RequesterID>();
        }
        for (int i = 0; i < nList.getLength(); i++) {
            Node childNode = nList.item(i);
            String cName = childNode.getLocalName();
            if (cName != null) {
                if (cName.equals(SAML2Constants.IDPLIST)) {
                    validateIDPList();
                    idpList = ProtocolFactory.getInstance().createIDPList((Element) childNode);
                } else if (cName.equals(SAML2Constants.REQUESTERID)) {
                    RequesterID reqID = ProtocolFactory.getInstance().createRequesterID((Element) childNode);
                    requesterIDList.add(reqID);
                }
            }
        }
        if (requesterIDList != null && !requesterIDList.isEmpty()) {
            requesterIDList = Collections.unmodifiableList(requesterIDList);
        }
    }
}
Also used : NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node) Element(org.w3c.dom.Element) RequesterID(com.sun.identity.saml2.protocol.RequesterID)

Aggregations

SAML2Exception (com.sun.identity.saml2.common.SAML2Exception)8 ArrayList (java.util.ArrayList)7 SAML2MetaException (com.sun.identity.saml2.meta.SAML2MetaException)6 List (java.util.List)6 COTException (com.sun.identity.cot.COTException)4 Iterator (java.util.Iterator)4 SPSSOConfigElement (com.sun.identity.saml2.jaxb.entityconfig.SPSSOConfigElement)3 AuthnRequest (com.sun.identity.saml2.protocol.AuthnRequest)3 IDPEntry (com.sun.identity.saml2.protocol.IDPEntry)3 IDPList (com.sun.identity.saml2.protocol.IDPList)3 SAML2TokenRepositoryException (org.forgerock.openam.federation.saml2.SAML2TokenRepositoryException)3 SessionException (com.sun.identity.plugin.session.SessionException)2 Issuer (com.sun.identity.saml2.assertion.Issuer)2 EntityDescriptorElement (com.sun.identity.saml2.jaxb.metadata.EntityDescriptorElement)2 SPSSODescriptorElement (com.sun.identity.saml2.jaxb.metadata.SPSSODescriptorElement)2 SAML2MetaManager (com.sun.identity.saml2.meta.SAML2MetaManager)2 NameIDPolicy (com.sun.identity.saml2.protocol.NameIDPolicy)2 RequesterID (com.sun.identity.saml2.protocol.RequesterID)2 Scoping (com.sun.identity.saml2.protocol.Scoping)2 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)2