Class LdapSecurityRealmBuilder

java.lang.Object
org.wildfly.security.auth.realm.ldap.LdapSecurityRealmBuilder

public class LdapSecurityRealmBuilder extends Object
Builder for the security realm implementation backed by LDAP.
Author:
Darran Lofthouse
  • Method Details

    • builder

      public static LdapSecurityRealmBuilder builder()
      Construct a new instance.
      Returns:
      the new builder instance
    • setProviders

      public LdapSecurityRealmBuilder setProviders(Supplier<Provider[]> providers)
      The the Provider[] supplier.
      Parameters:
      providers - the supplier of Providers to be used by the realm
      Returns:
      this builder
    • setDirContextSupplier

      public LdapSecurityRealmBuilder setDirContextSupplier(org.wildfly.common.function.ExceptionSupplier<DirContext, NamingException> dirContextSupplier)
      Set the directory context supplier.
      Parameters:
      dirContextSupplier - the directory context supplier
      Returns:
      this builder
    • setNameRewriter

      public LdapSecurityRealmBuilder setNameRewriter(org.wildfly.security.auth.server.NameRewriter nameRewriter)
      Add a name rewriter to this builder.
      Parameters:
      nameRewriter - the name rewriter
      Returns:
      this builder
    • setPageSize

      public LdapSecurityRealmBuilder setPageSize(int pageSize)
      Set size of page for realm iterating
      Parameters:
      pageSize - size of page
      Returns:
      this builder
    • identityMapping

    • setHashCharset

      public LdapSecurityRealmBuilder setHashCharset(Charset hashCharset)
      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 be null).
      Returns:
      this builder
    • setHashEncoding

      public LdapSecurityRealmBuilder setHashEncoding(org.wildfly.security.password.spec.Encoding hashEncoding)
      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

      public LdapSecurityRealmBuilder.UserPasswordCredentialLoaderBuilder userPasswordCredentialLoader()
    • otpCredentialLoader

    • x509EvidenceVerifier

    • addDirectEvidenceVerification

      public LdapSecurityRealmBuilder addDirectEvidenceVerification()
    • addDirectEvidenceVerification

      public LdapSecurityRealmBuilder addDirectEvidenceVerification(boolean allowBlankPassword)
    • build

      public org.wildfly.security.auth.server.ModifiableSecurityRealm build()
      Build this realm.
      Returns:
      the built realm