org.postgresql.plugin.AuthenticationPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbc-yugabytedb Show documentation
Show all versions of jdbc-yugabytedb Show documentation
Java JDBC 4.2 (JRE 8+) driver for YugaByte SQL database
The newest version!
/*
* Copyright (c) 2021, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.plugin;
import org.postgresql.util.PSQLException;
import org.checkerframework.checker.nullness.qual.Nullable;
public interface AuthenticationPlugin {
/**
* Callback method to provide the password to use for authentication.
*
* Implementers can also check the authentication type to ensure that the
* authentication handshake is using a specific authentication method (e.g. SASL)
* or avoiding a specific one (e.g. cleartext).
*
* For security reasons, the driver will wipe the contents of the array returned
* by this method after it has been used for authentication.
*
* Implementers must provide a new array each time this method is invoked as
* the previous contents will have been wiped.
*
* @param type The authentication method that the server is requesting
* @return The password to use or null if no password is available
* @throws PSQLException if something goes wrong supplying the password
*/
char @Nullable [] getPassword(AuthenticationRequestType type) throws PSQLException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy