Class BindAuthenticator

java.lang.Object
com.codename1.backend.security.ldap.BindAuthenticator
All Implemented Interfaces:
LdapAuthenticator

public final class BindAuthenticator extends Object implements LdapAuthenticator
Checks a password by binding as the user: the directory itself judges it, and its password policy (lockout, expiry) applies. The user's name is found from DN patterns (uid={0},ou=people) or a LdapUserSearch, as in Spring.
  • Constructor Details

  • Method Details

    • setUserDnPatterns

      public void setUserDnPatterns(String... patterns)
      Patterns relative to the base, {0} standing for the user name, tried in order.
    • setUserSearch

      public void setUserSearch(LdapUserSearch userSearch)
    • setUserAttributes

      public void setUserAttributes(String... attributes)
      The attributes read from the user's entry; all by default.
    • authenticate

      public LdapEntry authenticate(String username, String password)
      Specified by:
      authenticate in interface LdapAuthenticator