Search in sources :

Example 1 with SSLConfiguration

use of edu.uiuc.ncsa.security.util.ssl.SSLConfiguration in project OA4MP by ncsa.

the class ClientManagerTest method createLDAP.

protected LDAPConfiguration createLDAP() {
    LDAPConfiguration ldap = new LDAPConfiguration();
    ldap.setServer("foo.bar.edu");
    ldap.setAuthType(LDAPConfigurationUtil.LDAP_AUTH_SIMPLE_KEY);
    ldap.setContextName("ou=foo/cn=bar" + System.currentTimeMillis());
    for (int i = 0; i < 3; i++) {
        LDAPConfigurationUtil.AttributeEntry ae = new LDAPConfigurationUtil.AttributeEntry("source" + i, "target" + i, (i % 2 == 0), false);
        ldap.getSearchAttributes().put(ae.sourceName, ae);
    }
    SSLConfiguration ssl = new SSLConfiguration();
    ssl.setKeystorePassword("changeme");
    ssl.setKeystoreType("JKS");
    ssl.setKeystore("/home/ncsa/dev/csd/config/cacerts2");
    ldap.setSslConfiguration(ssl);
    System.out.println(DD);
    System.out.println("LDAP from config serializer:");
    return ldap;
}
Also used : SSLConfiguration(edu.uiuc.ncsa.security.util.ssl.SSLConfiguration) LDAPConfiguration(edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfiguration) LDAPConfigurationUtil(edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfigurationUtil)

Aggregations

LDAPConfiguration (edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfiguration)1 LDAPConfigurationUtil (edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfigurationUtil)1 SSLConfiguration (edu.uiuc.ncsa.security.util.ssl.SSLConfiguration)1