use of org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler in project jackrabbit-oak by apache.
the class AbstractServer method setupSaslMechanisms.
private void setupSaslMechanisms() {
Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String, MechanismHandler>();
mechanismHandlerMap.put(SupportedSaslMechanisms.PLAIN, new PlainMechanismHandler());
CramMd5MechanismHandler cramMd5MechanismHandler = new CramMd5MechanismHandler();
mechanismHandlerMap.put(SupportedSaslMechanisms.CRAM_MD5, cramMd5MechanismHandler);
DigestMd5MechanismHandler digestMd5MechanismHandler = new DigestMd5MechanismHandler();
mechanismHandlerMap.put(SupportedSaslMechanisms.DIGEST_MD5, digestMd5MechanismHandler);
GssapiMechanismHandler gssapiMechanismHandler = new GssapiMechanismHandler();
mechanismHandlerMap.put(SupportedSaslMechanisms.GSSAPI, gssapiMechanismHandler);
NtlmMechanismHandler ntlmMechanismHandler = new NtlmMechanismHandler();
// TODO - set some sort of default NtlmProvider implementation here
// ntlmMechanismHandler.setNtlmProvider( provider );
// TODO - or set FQCN of some sort of default NtlmProvider implementation here
// ntlmMechanismHandler.setNtlmProviderFqcn( "com.foo.BarNtlmProvider" );
mechanismHandlerMap.put(SupportedSaslMechanisms.NTLM, ntlmMechanismHandler);
mechanismHandlerMap.put(SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler);
ldapServer.setSaslMechanismHandlers(mechanismHandlerMap);
}
use of org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler in project keycloak by keycloak.
the class KerberosEmbeddedServer method createLdapServer.
@Override
protected LdapServer createLdapServer() {
LdapServer ldapServer = super.createLdapServer();
ldapServer.setSaslHost(this.bindHost);
ldapServer.setSaslPrincipal(this.ldapSaslPrincipal);
ldapServer.setSaslRealms(new ArrayList<String>());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.PLAIN, new PlainMechanismHandler());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.CRAM_MD5, new CramMd5MechanismHandler());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.DIGEST_MD5, new DigestMd5MechanismHandler());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.GSSAPI, new GssapiMechanismHandler());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.NTLM, new NtlmMechanismHandler());
ldapServer.addSaslMechanismHandler(SupportedSaslMechanisms.GSS_SPNEGO, new NtlmMechanismHandler());
return ldapServer;
}
Aggregations