Top Description Fields Constructors Methods
org.h2.security.auth.impl

public Class StaticUserCredentialsValidator

extends Object
implements CredentialsValidator
Class Inheritance
All Implemented Interfaces
org.h2.api.CredentialsValidator, org.h2.security.auth.Configurable
Imports
java.nio.charset.StandardCharsets, java.util.regex.Pattern, org.h2.api.CredentialsValidator, org.h2.security.SHA256, org.h2.security.auth.AuthenticationException, .AuthenticationInfo, .ConfigProperties, org.h2.util.MathUtils, .StringUtils, .Utils

This credentials validator matches the user and password with the configured Usage should be limited to test purposes

Field Summary

Modifier and TypeField and Description
private byte[]
private String
private byte[]
private Pattern

Constructor Summary

AccessConstructor and Description
public
public
StaticUserCredentialsValidator(String userNamePattern, String password)

Method Summary

Modifier and TypeMethod and Description
public void
configure(ConfigProperties
= configuration properties
configProperties
)

Implements org.h2.security.auth.Configurable.configure.

configure the component

public boolean
validateCredentials(AuthenticationInfo
= authentication info
authenticationInfo
)

Implements org.h2.api.CredentialsValidator.validateCredentials.

Validate user credential.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hashWithSaltback to summary
private byte[] hashWithSalt
passwordback to summary
private String password
saltback to summary
private byte[] salt
userNamePatternback to summary
private Pattern userNamePattern

Constructor Detail

StaticUserCredentialsValidatorback to summary
public StaticUserCredentialsValidator()
StaticUserCredentialsValidatorback to summary
public StaticUserCredentialsValidator(String userNamePattern, String password)

Method Detail

configureback to summary
public void configure(ConfigProperties configProperties)

Implements org.h2.security.auth.Configurable.configure.

Doc from org.h2.security.auth.Configurable.configure.

configure the component

Parameters
configProperties:ConfigProperties

= configuration properties

Annotations
@Override
validateCredentialsback to summary
public boolean validateCredentials(AuthenticationInfo authenticationInfo) throws AuthenticationException

Implements org.h2.api.CredentialsValidator.validateCredentials.

Doc from org.h2.api.CredentialsValidator.validateCredentials.

Validate user credential.

Parameters
authenticationInfo:AuthenticationInfo

= authentication info

Returns:boolean

true if credentials are valid, otherwise false

Annotations
@Override