Class LDAPContextManager
java.lang.Object
org.keycloak.storage.ldap.idm.store.ldap.LDAPContextManager
- All Implemented Interfaces:
AutoCloseable
- Author:
- mhajas
-
Constructor Summary
ConstructorDescriptionLDAPContextManager
(KeycloakSession session, LDAPConfig connectionProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static LDAPContextManager
create
(KeycloakSession session, LDAPConfig connectionProperties) getNonAuthConnectionProperties
(LDAPConfig ldapConfig) This method is used for admin connection and user authentication.static StartTlsResponse
startTLS
(LdapContext ldapContext, String authType, String bindDN, char[] bindCredential, SSLSocketFactory sslSocketFactory)
-
Constructor Details
-
LDAPContextManager
-
-
Method Details
-
create
-
getLdapContext
- Throws:
NamingException
-
startTLS
public static StartTlsResponse startTLS(LdapContext ldapContext, String authType, String bindDN, char[] bindCredential, SSLSocketFactory sslSocketFactory) throws NamingException - Throws:
NamingException
-
getNonAuthConnectionProperties
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- Parameters:
ldapConfig
-- Returns:
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-