You can create a custom OAK Login Module for Adobe Experience Manager (AEM) that is called when a user logs into AEM from a 3rd party authentication system such as LDAP. To create a custom OAK Login Module, you use the javax.security.auth.spi.LoginModule interface. One use case for writing a custom OAK login module is to add custom application logic to a callback. That is, when a user logs in from LDAP, a callback is invoked.
A custom OAK login module is implemented as an OSGi bundle. To read this development article, click https://helpx.adobe.com/experience-manager/using/oak-login.html.
Note; For information about using LDAP with AEM 6.x, see Configuring Adobe Experience Manager 6 to use Apache Directory Service.