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 classJaasCredentialsValidator.AuthenticationInfoCallbackHandler
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringappNamestatic java.lang.StringDEFAULT_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 voidconfigure(ConfigProperties configProperties)configure the componentbooleanvalidateCredentials(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: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
-
-