Package org.mariadb.jdbc.plugin
Interface AuthenticationPlugin
-
- All Known Implementing Classes:
CachingSha2PasswordPlugin,ClearPasswordPlugin,Ed25519PasswordPlugin,NativePasswordPlugin,SendGssApiAuthPacket,SendPamAuthPacket
public interface AuthenticationPluginAuthentication plugin descriptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default byte[]hash(Credential credential)Return Hashvoidinitialize(String authenticationData, byte[] seed, Configuration conf, HostAddress hostAddress)Plugin initialization.default booleanisMitMProof()Can plugins is MitM-proof, permitting returning HASHorg.mariadb.jdbc.client.ReadableByteBufprocess(Writer encoder, Reader decoder, org.mariadb.jdbc.client.Context context)Process plugin authentication.default booleanrequireSsl()Authentication plugin required SSL to be usedStringtype()Authentication plugin type.
-
-
-
Method Detail
-
type
String type()
Authentication plugin type.- Returns:
- authentication plugin type. ex: mysql_native_password
-
initialize
void initialize(String authenticationData, byte[] seed, Configuration conf, HostAddress hostAddress)
Plugin initialization.- Parameters:
authenticationData- authentication data (password/token)seed- server provided seedconf- Connection optionshostAddress- host address
-
process
org.mariadb.jdbc.client.ReadableByteBuf process(Writer encoder, Reader decoder, org.mariadb.jdbc.client.Context context) throws IOException, SQLException
Process plugin authentication.- Parameters:
encoder- out streamdecoder- in streamcontext- connection context- Returns:
- response packet
- Throws:
IOException- if socket errorSQLException- if plugin exception
-
isMitMProof
default boolean isMitMProof()
Can plugins is MitM-proof, permitting returning HASH- Returns:
- true if permitted
-
hash
default byte[] hash(Credential credential)
Return Hash- Parameters:
credential- credential- Returns:
- hash
-
requireSsl
default boolean requireSsl()
Authentication plugin required SSL to be used- Returns:
- true if SSL is required
-
-