Search in sources :

Example 1 with NtlmMechanismHandler

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);
}
Also used : PlainMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.plain.PlainMechanismHandler) GssapiMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.gssapi.GssapiMechanismHandler) NtlmMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler) HashMap(java.util.HashMap) CramMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.cramMD5.CramMd5MechanismHandler) NtlmMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler) CramMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.cramMD5.CramMd5MechanismHandler) PlainMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.plain.PlainMechanismHandler) DigestMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.digestMD5.DigestMd5MechanismHandler) GssapiMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.gssapi.GssapiMechanismHandler) MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.MechanismHandler) DigestMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.digestMD5.DigestMd5MechanismHandler)

Example 2 with NtlmMechanismHandler

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;
}
Also used : PlainMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.plain.PlainMechanismHandler) GssapiMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.gssapi.GssapiMechanismHandler) NtlmMechanismHandler(org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler) LdapServer(org.apache.directory.server.ldap.LdapServer) CramMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.cramMD5.CramMd5MechanismHandler) DigestMd5MechanismHandler(org.apache.directory.server.ldap.handlers.sasl.digestMD5.DigestMd5MechanismHandler)

Aggregations

CramMd5MechanismHandler (org.apache.directory.server.ldap.handlers.sasl.cramMD5.CramMd5MechanismHandler)2 DigestMd5MechanismHandler (org.apache.directory.server.ldap.handlers.sasl.digestMD5.DigestMd5MechanismHandler)2 GssapiMechanismHandler (org.apache.directory.server.ldap.handlers.sasl.gssapi.GssapiMechanismHandler)2 NtlmMechanismHandler (org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler)2 PlainMechanismHandler (org.apache.directory.server.ldap.handlers.sasl.plain.PlainMechanismHandler)2 HashMap (java.util.HashMap)1 LdapServer (org.apache.directory.server.ldap.LdapServer)1 MechanismHandler (org.apache.directory.server.ldap.handlers.sasl.MechanismHandler)1