Class LdapConfiguration.GroupConfiguration
java.lang.Object
io.micronaut.security.ldap.configuration.LdapConfiguration.GroupConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Enclosing class:
- LdapConfiguration
@ConfigurationProperties("groups")
public static class LdapConfiguration.GroupConfiguration
extends Object
implements io.micronaut.core.util.Toggleable
The group configuration.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBase()
The argument to pass to the search filter.getSearchSettings
(Object[] arguments) boolean
boolean
void
setAttribute
(String attribute) Sets the group attribute name.void
Sets the base DN to search from.void
setEnabled
(boolean enabled) Sets if group search is enabled.void
Sets the group search filter.void
setFilterAttribute
(String filterAttribute) Sets the name of the user attribute to bind to the group search filter.void
setSubtree
(boolean subtree) Sets if the subtree should be searched.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
GroupConfiguration
public GroupConfiguration()
-
-
Method Details
-
isSubtree
public boolean isSubtree()- Returns:
- True if the subtree should be searched
-
setSubtree
public void setSubtree(boolean subtree) Sets if the subtree should be searched. Default true- Parameters:
subtree
- The subtree
-
getBase
- Returns:
- The base DN to search from
-
setBase
Sets the base DN to search from.- Parameters:
base
- The base DN
-
getFilter
- Returns:
- The filter used to search for groups
-
setFilter
Sets the group search filter. Default "uniquemember={0}"- Parameters:
filter
- The filter
-
getAttribute
- Returns:
- Which attribute is the group name
-
setAttribute
Sets the group attribute name. Default "cn"- Parameters:
attribute
- The attribute name
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets if group search is enabled. Default false- Parameters:
enabled
- The enabled setting
-
getSearchSettings
- Parameters:
arguments
- The search arguments- Returns:
- Settings to search ldap groups
-
getFilterAttribute
The argument to pass to the search filter.- Returns:
- The name of an attribute in the user
-
setFilterAttribute
Sets the name of the user attribute to bind to the group search filter. Defaults to the user's DN.- Parameters:
filterAttribute
- The attribute
-