Package org.h2.security.auth.impl
Class JaasCredentialsValidator
- java.lang.Object
-
- org.h2.security.auth.impl.JaasCredentialsValidator
-
- All Implemented Interfaces:
CredentialsValidator
,Configurable
public class JaasCredentialsValidator extends java.lang.Object implements CredentialsValidator
Validate credentials by using standard Java Authentication and Authorization ServiceConfiguration parameters:
- appName inside the JAAS configuration (by default h2)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JaasCredentialsValidator.AuthenticationInfoCallbackHandler
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
appName
static java.lang.String
DEFAULT_APPNAME
-
Constructor Summary
Constructors Constructor Description JaasCredentialsValidator()
JaasCredentialsValidator(java.lang.String appName)
Create the validator with the given name of JAAS configuration
-
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.
-
-
-
Field Detail
-
DEFAULT_APPNAME
public static final java.lang.String DEFAULT_APPNAME
- See Also:
- Constant Field Values
-
appName
private java.lang.String appName
-
-
Method Detail
-
configure
public void configure(ConfigProperties configProperties)
Description copied from interface:Configurable
configure the component- Specified by:
configure
in interfaceConfigurable
- Parameters:
configProperties
- = configuration properties
-
validateCredentials
public boolean validateCredentials(AuthenticationInfo authenticationInfo) throws java.lang.Exception
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:
java.lang.Exception
- any exception occurred (invalid credentials or internal issue) prevent user login
-
-