Class LdapMapContextManager
- java.lang.Object
-
- org.keycloak.models.map.storage.ldap.store.LdapMapContextManager
-
- All Implemented Interfaces:
AutoCloseable
public final class LdapMapContextManager extends Object implements AutoCloseable
- Author:
- mhajas
-
-
Constructor Summary
Constructors Constructor Description LdapMapContextManager(KeycloakSession session, LdapMapConfig connectionProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static LdapMapContextManager
create(KeycloakSession session, LdapMapConfig connectionProperties)
LdapContext
getLdapContext()
static Hashtable<Object,Object>
getNonAuthConnectionProperties(LdapMapConfig ldapMapConfig)
This method is used for admin connection and user authentication.static StartTlsResponse
startTLS(LdapContext ldapContext, String authType, String bindDN, char[] bindCredential, SSLSocketFactory sslSocketFactory)
-
-
-
Constructor Detail
-
LdapMapContextManager
public LdapMapContextManager(KeycloakSession session, LdapMapConfig connectionProperties)
-
-
Method Detail
-
create
public static LdapMapContextManager create(KeycloakSession session, LdapMapConfig connectionProperties)
-
getLdapContext
public LdapContext getLdapContext() throws NamingException
- Throws:
NamingException
-
startTLS
public static StartTlsResponse startTLS(LdapContext ldapContext, String authType, String bindDN, char[] bindCredential, SSLSocketFactory sslSocketFactory) throws NamingException
- Throws:
NamingException
-
getNonAuthConnectionProperties
public static Hashtable<Object,Object> getNonAuthConnectionProperties(LdapMapConfig ldapMapConfig)
This method is used for admin connection and user authentication. Hence it returns just connection properties NOT related to authentication (properties like bindType, bindDn, bindPassword). Caller of this method needs to fill auth-related connection properties based on the fact whether he does admin connection or user authentication
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-