Package org.h2.security.auth.impl
Class StaticUserCredentialsValidator
- java.lang.Object
-
- org.h2.security.auth.impl.StaticUserCredentialsValidator
-
- All Implemented Interfaces:
CredentialsValidator
,Configurable
public class StaticUserCredentialsValidator extends java.lang.Object implements CredentialsValidator
This credentials validator matches the user and password with the configured Usage should be limited to test purposes
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
hashWithSalt
private java.lang.String
password
private byte[]
salt
private java.util.regex.Pattern
userNamePattern
-
Constructor Summary
Constructors Constructor Description StaticUserCredentialsValidator()
StaticUserCredentialsValidator(java.lang.String userNamePattern, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(ConfigProperties configProperties)
configure the componentboolean
validateCredentials(AuthenticationInfo authenticationInfo)
Validate user credential.
-
-
-
Method Detail
-
validateCredentials
public boolean validateCredentials(AuthenticationInfo authenticationInfo) throws AuthenticationException
Description copied from interface:CredentialsValidator
Validate user credential.- Specified by:
validateCredentials
in interfaceCredentialsValidator
- Parameters:
authenticationInfo
- = authentication info- Returns:
- true if credentials are valid, otherwise false
- Throws:
AuthenticationException
-
configure
public void configure(ConfigProperties configProperties)
Description copied from interface:Configurable
configure the component- Specified by:
configure
in interfaceConfigurable
- Parameters:
configProperties
- = configuration properties
-
-