@LdapIdentityStoreDefinition is used with any active directory servers that store the identity information.
Here, we provide the LDAP queries to retrieve the user information:
@LdapIdentityStoreDefinition(
url = "ldap://localhost:8090",
callerBaseDn = "ou=org,dc=testdata,dc=org",
groupSearchBase = "ou=group,dc=test,dc=org",
groupSearchFilter = "((member=%s)(objectClass=groupOfNames))")
@ApplicationScoped
class ApplicationConfig : Application() {
override fun getClasses(): Set<Class<*>> {
val classes = HashSet<Class<*>>()
classes.add(Controller::class.java)
return classes
}
}
We've discussed how to configure @EmbeddedIdentityStoreDefinition, @DataBaseIdentityStoreDefinition, and @LdapIdentityStoreDefinition. With these identity stores, we can write code for application security by configuring these identity store implementations in the code.