| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: Alessandro Ventura |
| 5 |
*/ |
| 6 |
package org.h2.api; |
| 7 |
|
| 8 |
import org.h2.security.auth.AuthenticationInfo; |
| 9 |
import org.h2.security.auth.Configurable; |
| 10 |
|
| 11 |
/** |
| 12 |
* A class that implement this interface can be used to validate credentials |
| 13 |
* provided by client. |
| 14 |
* <p> |
| 15 |
* <b>This feature is experimental and subject to change</b> |
| 16 |
* </p> |
| 17 |
*/ |
| 18 |
public interface CredentialsValidator extends Configurable { |
| 19 |
|
| 20 |
/** |
| 21 |
* Validate user credential. |
| 22 |
* |
| 23 |
* @param authenticationInfo |
| 24 |
* = authentication info |
| 25 |
* @return true if credentials are valid, otherwise false |
| 26 |
* @throws Exception |
| 27 |
* any exception occurred (invalid credentials or internal |
| 28 |
* issue) prevent user login |
| 29 |
*/ |
| 30 |
boolean validateCredentials(AuthenticationInfo authenticationInfo) throws Exception; |
| 31 |
|
| 32 |
} |