Package org.h2.security.auth.impl
Class LdapCredentialsValidator
- java.lang.Object
-
- org.h2.security.auth.impl.LdapCredentialsValidator
-
- All Implemented Interfaces:
CredentialsValidator,Configurable
public class LdapCredentialsValidator extends java.lang.Object implements CredentialsValidator
Validate credentials by performing an LDAP bindConfiguration parameters:
- bindDnPattern bind dn pattern with %u instead of username (example: uid=%u,ou=users,dc=example,dc=com)
- host ldap server
- port of ldap service; optional, by default 389 for insecure, 636 for secure
- secure, optional by default is true (use SSL)
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbindDnPatternprivate java.lang.Stringhostprivate intportprivate booleansecureprivate java.lang.Stringurl
-
Constructor Summary
Constructors Constructor Description LdapCredentialsValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(ConfigProperties configProperties)configure the componentbooleanvalidateCredentials(AuthenticationInfo authenticationInfo)Validate user credential.
-
-
-
Method Detail
-
configure
public void configure(ConfigProperties configProperties)
Description copied from interface:Configurableconfigure the component- Specified by:
configurein interfaceConfigurable- Parameters:
configProperties- = configuration properties
-
validateCredentials
public boolean validateCredentials(AuthenticationInfo authenticationInfo) throws java.lang.Exception
Description copied from interface:CredentialsValidatorValidate user credential.- Specified by:
validateCredentialsin interfaceCredentialsValidator- Parameters:
authenticationInfo- = authentication info- Returns:
- true if credentials are valid, otherwise false
- Throws:
java.lang.Exception- any exception occurred (invalid credentials or internal issue) prevent user login
-
-