Class LdapSecurityRealmBuilder.IdentityMappingBuilder
java.lang.Object
org.wildfly.security.auth.realm.ldap.LdapSecurityRealmBuilder.IdentityMappingBuilder
- Enclosing class:
- LdapSecurityRealmBuilder
A builder for a principal mapping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()map(AttributeMapping... attributes) Define an attribute mapping configuration.Indicate if queries are searchRecursive, searching the entire subtree rooted at the name specified insetSearchDn(String).setFilterName(String filterName) setIteratorFilter(String iteratorFilter) setNewIdentityAttributes(Attributes newIdentityAttributes) setNewIdentityParent(LdapName newIdentityParent) setRdnIdentifier(String nameAttribute) Set the name of the attribute in LDAP that holds the user name and will appear in path of new entries.setSearchDn(String searchDn) Set the name of the context to be used when executing queries.setSearchTimeLimit(int limit) Sets the time limit of LDAP search in milliseconds.
-
Constructor Details
-
IdentityMappingBuilder
public IdentityMappingBuilder()
-
-
Method Details
-
setSearchDn
Set the name of the context to be used when executing queries.
This option is specially useful when authenticating users based on names that don't use a X.500 format such as plainUser. In this case, you must also provide
setRdnIdentifier(String)with the attribute name that contains the user name.If the names used to authenticate users are based on the X.500 format, this configuration can be suppressed.
Please note that by using this option the realm is able to authenticate users based on their simple or X.500 names.
- Parameters:
searchDn- the name of the context to search- Returns:
- this builder
-
searchRecursive
Indicate if queries are searchRecursive, searching the entire subtree rooted at the name specified insetSearchDn(String). Otherwise search one level of the named context.- Returns:
- this builder
-
setSearchTimeLimit
Sets the time limit of LDAP search in milliseconds.- Parameters:
limit- the limit in milliseconds. Defaults to 10000 milliseconds.- Returns:
- this builder
-
setRdnIdentifier
Set the name of the attribute in LDAP that holds the user name and will appear in path of new entries.- Parameters:
nameAttribute- the name attribute- Returns:
- this builder
-
setNewIdentityParent
public LdapSecurityRealmBuilder.IdentityMappingBuilder setNewIdentityParent(LdapName newIdentityParent) -
setNewIdentityAttributes
public LdapSecurityRealmBuilder.IdentityMappingBuilder setNewIdentityAttributes(Attributes newIdentityAttributes) -
setFilterName
-
setIteratorFilter
-
map
Define an attribute mapping configuration.- Parameters:
attributes- one or moreAttributeMappingconfiguration- Returns:
- this builder
-
build
-