1 package edu.internet2.middleware.shibboleth.common;
3 import org.opensaml.SAMLBinding;
4 import org.opensaml.SAMLSOAPBinding;
6 import edu.internet2.middleware.shibboleth.common.*;
9 * Used by Shibboleth SHAR/AA to locate a SAML binding implementation
11 * @author Scott Cantor
12 * @created April 10, 2002
14 public class SAMLBindingFactory
17 * Gets a compatible binding implementation for the specified protocol and
20 * @param protocol URI of SAML binding protocol
21 * @param policies Array of policy URIs that the
22 * implementation must support
23 * @return A compatible binding
24 * implementation or null if one cannot be found
26 public static SAMLBinding getInstance(String protocol, String[] policies)
28 // Current version only knows about SOAP binding and Club Shib...
29 if (protocol == null || !protocol.equals(SAMLBinding.SAML_SOAP_HTTPS))
31 if (policies==null || policies.length!=1 || !policies[0].equals(Constants.POLICY_CLUBSHIB))
33 return new SAMLSOAPBinding();