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
Modifier and TypeClassDescriptionstatic class
The context configuration.static class
The group configuration.static class
The user search configuration. -
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The 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.boolean
void
setContext
(LdapConfiguration.ContextConfiguration contextConfiguration) Sets the context configuration.void
setEnabled
(boolean enabled) Sets whether this configuration is enabled.void
setGroups
(LdapConfiguration.GroupConfiguration groupConfiguration) Sets the group configuration.void
setSearch
(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:
isEnabled
in 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.
-