Class LdapConfiguration
java.lang.Object
io.micronaut.security.ldap.configuration.LdapConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
@EachProperty(value="micronaut.security.ldap",
primary="default")
public class LdapConfiguration
extends Object
implements io.micronaut.core.util.Toggleable
Configuration for LDAP authentication.
- Since:
- 1.0
- Author:
- James Kleeh
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe context configuration.static classThe group configuration.static classThe user search configuration. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final String -
Method Summary
Modifier and TypeMethodDescriptiongetName()getSettings(String dn, String password) Returns settings for creating a context for a given dn and password.booleanvoidsetContext(LdapConfiguration.ContextConfiguration contextConfiguration) Sets the context configuration.voidsetEnabled(boolean enabled) Sets whether this configuration is enabled.voidsetGroups(LdapConfiguration.GroupConfiguration groupConfiguration) Sets the group configuration.voidsetSearch(LdapConfiguration.SearchConfiguration searchConfiguration) Sets the search configuration.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Method Details
-
getName
- Returns:
- The name of the configuration
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether this configuration is enabled. Default true.- Parameters:
enabled- The enabled setting
-
getContext
- Returns:
- The context configuration
-
setContext
Sets the context configuration.- Parameters:
contextConfiguration- The context configuration
-
getSearch
- Returns:
- The search configuration
-
setSearch
Sets the search configuration.- Parameters:
searchConfiguration- The search configuration
-
getGroups
- Returns:
- The group configuration
-
setGroups
Sets the group configuration.- Parameters:
groupConfiguration- The group configuration
-
getSettings
Returns settings for creating a context for a given dn and password.- Parameters:
dn- The user dn to bind withpassword- The user password to bind with- Returns:
- Settings to use to create a context
-
getManagerSettings
- Returns:
- Settings for creating a context for the manager.
-