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 Object implements CredentialsValidator
Validate credentials by using standard Java Authentication and Authorization Service

Configuration parameters:

- appName inside the JAAS configuration (by default h2)

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_APPNAME`

## Constructor Summary

Constructors
Constructor
Description
`JaasCredentialsValidator()`
`JaasCredentialsValidator(String appName)`
Create the validator with the given name of JAAS configuration

## Method Summary

Modifier and Type
Method
Description
`void`
`configure(ConfigProperties configProperties)`
configure the component
`boolean`
`validateCredentials(AuthenticationInfo authenticationInfo)`
Validate user credential.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_APPNAME

public static final String DEFAULT_APPNAME

See Also:
  - Constant Field Values

## Constructor Details

### JaasCredentialsValidator

public JaasCredentialsValidator()

### JaasCredentialsValidator

public JaasCredentialsValidator(String appName)
Create the validator with the given name of JAAS configuration

Parameters:
  `appName` - = name of JAAS configuration

## Method Details

### configure

public void configure(ConfigProperties configProperties)
Description copied from interface: `Configurable`
configure the component

Specified by:
  `configure` in interface `Configurable`
Parameters:
  `configProperties` - = configuration properties

### validateCredentials

public boolean validateCredentials(AuthenticationInfo authenticationInfo) throws Exception
Description copied from interface: `CredentialsValidator`
Validate user credential.

Specified by:
  `validateCredentials` in interface `CredentialsValidator`
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