Package org.h2.security.auth.impl
Class JaasCredentialsValidator
java.lang.Object
org.h2.security.auth.impl.JaasCredentialsValidator
- All Implemented Interfaces:
CredentialsValidator,Configurable
Validate credentials by using standard Java Authentication and Authorization Service
Configuration parameters:
- appName inside the JAAS configuration (by default h2)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJaasCredentialsValidator(String appName) Create the validator with the given name of JAAS configuration -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(ConfigProperties configProperties) configure the componentbooleanvalidateCredentials(AuthenticationInfo authenticationInfo) Validate user credential.
-
Field Details
-
DEFAULT_APPNAME
- See Also:
-
-
Constructor Details
-
JaasCredentialsValidator
public JaasCredentialsValidator() -
JaasCredentialsValidator
Create the validator with the given name of JAAS configuration- Parameters:
appName- = name of JAAS configuration
-
-
Method Details
-
configure
Description copied from interface:Configurableconfigure the component- Specified by:
configurein interfaceConfigurable- Parameters:
configProperties- = configuration properties
-
validateCredentials
Description copied from interface:CredentialsValidatorValidate user credential.- Specified by:
validateCredentialsin interfaceCredentialsValidator- Parameters:
authenticationInfo- = authentication info- Returns:
- true if credentials are valid, otherwise false
- Throws:
Exception- any exception occurred (invalid credentials or internal issue) prevent user login
-