Class LdapSecurityRealmBuilder
java.lang.Object
org.wildfly.security.auth.realm.ldap.LdapSecurityRealmBuilder
Builder for the security realm implementation backed by LDAP.
- Author:
- Darran Lofthouse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA builder for a principal mapping.classclassclass -
Method Summary
Modifier and TypeMethodDescriptionaddDirectEvidenceVerification(boolean allowBlankPassword) build()Build this realm.static LdapSecurityRealmBuilderbuilder()Construct a new instance.setDirContextSupplier(ExceptionSupplier<DirContext, NamingException> dirContextSupplier) Set the directory context supplier.setHashCharset(Charset hashCharset) Set the character set to use when converting the password string to a byte array.setHashEncoding(Encoding hashEncoding) Set the string format for the password in the properties file if they are not stored in plain text.setNameRewriter(NameRewriter nameRewriter) Add a name rewriter to this builder.setPageSize(int pageSize) Set size of page for realm iteratingsetProviders(Supplier<Provider[]> providers) The the Provider[] supplier.
-
Method Details
-
builder
Construct a new instance.- Returns:
- the new builder instance
-
setProviders
The the Provider[] supplier.- Parameters:
providers- the supplier of Providers to be used by the realm- Returns:
- this builder
-
setDirContextSupplier
public LdapSecurityRealmBuilder setDirContextSupplier(ExceptionSupplier<DirContext, NamingException> dirContextSupplier) Set the directory context supplier.- Parameters:
dirContextSupplier- the directory context supplier- Returns:
- this builder
-
setNameRewriter
Add a name rewriter to this builder.- Parameters:
nameRewriter- the name rewriter- Returns:
- this builder
-
setPageSize
Set size of page for realm iterating- Parameters:
pageSize- size of page- Returns:
- this builder
-
identityMapping
-
setHashCharset
Set the character set to use when converting the password string to a byte array. Set to UTF-8 by default.- Parameters:
hashCharset- the name of the character set (must not benull).- Returns:
- this builder
-
setHashEncoding
Set the string format for the password in the properties file if they are not stored in plain text. Set to base64 by default.- Parameters:
hashEncoding- specifies the string format for the hashed password- Returns:
- this builder
-
userPasswordCredentialLoader
-
otpCredentialLoader
-
x509EvidenceVerifier
-
addDirectEvidenceVerification
-
addDirectEvidenceVerification
-
build
Build this realm.- Returns:
- the built realm
-