Package org.mariadb.jdbc.authentication
Interface AuthenticationPlugin
- All Known Implementing Classes:
CachingSha2PasswordPlugin
,ClearPasswordPlugin
,Ed25519PasswordPlugin
,NativePasswordPlugin
,OldPasswordPlugin
,SendGssApiAuthPacket
,SendPamAuthPacket
,Sha256PasswordPlugin
public interface AuthenticationPlugin
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(String authenticationData, byte[] seed, Options options) Plugin initialization.default boolean
Indicate if use of this plugins need SSL enabled.name()
Authentication plugin name.process
(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence) Process plugin authentication.type()
Authentication plugin type.
-
Method Details
-
name
String name()Authentication plugin name.- Returns:
- authentication plugin name. ex: Mysql native password
-
type
String type()Authentication plugin type.- Returns:
- authentication plugin type. ex: mysql_native_password
-
mustUseSsl
default boolean mustUseSsl()Indicate if use of this plugins need SSL enabled.- Returns:
- true if SSL is mandatory
-
initialize
Plugin initialization.- Parameters:
authenticationData
- authentication data (password/token)seed
- server provided seedoptions
- Connection string options
-
process
Buffer process(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence) throws IOException, SQLException Process plugin authentication.- Parameters:
out
- out streamin
- in streamsequence
- packet sequence- Returns:
- response packet
- Throws:
IOException
- if socket errorSQLException
- if plugin exception
-