Class LdapConfiguration.ContextConfiguration

java.lang.Object
io.micronaut.security.ldap.configuration.LdapConfiguration.ContextConfiguration
Enclosing class:
LdapConfiguration

@ConfigurationProperties("context") public static class LdapConfiguration.ContextConfiguration extends Object
The context configuration.
  • Field Details

  • Constructor Details

    • ContextConfiguration

      public ContextConfiguration()
  • Method Details

    • getServer

      public String getServer()
      Returns:
      The ldap server URL
    • setServer

      public void setServer(String server)
      Sets the server URL.
      Parameters:
      server - The server URL
    • getManagerDn

      public String getManagerDn()
      Returns:
      The manager DN
    • setManagerDn

      public void setManagerDn(String managerDn)
      Sets the manager DN.
      Parameters:
      managerDn - The manager DN
    • getManagerPassword

      public String getManagerPassword()
      Returns:
      The manager password
    • setManagerPassword

      public void setManagerPassword(String managerPassword)
      Sets the manager password.
      Parameters:
      managerPassword - The manager password
    • getFactory

      public String getFactory()
      Returns:
      The context factory class
    • setFactory

      public void setFactory(String factory)
      Sets the context factory class. Default "com.sun.jndi.ldap.LdapCtxFactory"
      Parameters:
      factory - The factory class
    • isPooled

      public boolean isPooled()
      Returns:
      Whether the manager context uses the JNDI LDAP connection pool
      Since:
      4.18.2
    • setPooled

      public void setPooled(boolean pooled)
      Sets whether the manager context uses the JNDI LDAP connection pool (com.sun.jndi.ldap.connect.pool). The pool is shared by the whole JVM and, unless bounded, the JDK neither limits its size nor closes idle connections, so a burst of authentication attempts can leave the directory without free connections for user binds. When pooling is enabled, the pool is bounded with getPool(), whose values are applied as the com.sun.jndi.ldap.connect.pool.maxsize, com.sun.jndi.ldap.connect.pool.prefsize and com.sun.jndi.ldap.connect.pool.timeout system properties before the first pooled connection is opened. Contexts bound with user credentials are never pooled. This is the only supported pooling switch: a com.sun.jndi.ldap.connect.pool entry in the additional context properties is ignored. Default false.
      Parameters:
      pooled - Whether the manager context is pooled
      Since:
      4.18.2
    • getPool

      Returns:
      The bounds of the JNDI LDAP connection pool, applied when isPooled() is true
      Since:
      4.18.2
    • setPool

      Sets the bounds of the JNDI LDAP connection pool, applied when isPooled() is true.
      Parameters:
      pool - The pool configuration
      Since:
      4.18.2
    • getProperties

      public Map<String,Object> getProperties()
      Returns:
      Any additional properties
    • setProperties

      public void setProperties(@MapFormat(transformation=FLAT,keyFormat=RAW) Map<String,Object> properties)
      Any additional properties that should be passed to InitialDirContext(java.util.Hashtable). Keys are bound verbatim and flat, so a key such as java.naming.security.protocol is passed to JNDI as a single property name instead of being split into nested maps.
      Parameters:
      properties - The additional properties