Package org.mariadb.jdbc.authentication
Interface AuthenticationPlugin
-
- All Known Implementing Classes:
CachingSha2PasswordPlugin
,ClearPasswordPlugin
,Ed25519PasswordPlugin
,NativePasswordPlugin
,OldPasswordPlugin
,SendGssApiAuthPacket
,SendPamAuthPacket
,Sha256PasswordPlugin
public interface AuthenticationPlugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
initialize(String authenticationData, byte[] seed, Options options)
Plugin initialization.default boolean
mustUseSsl()
Indicate if use of this plugins need SSL enabled.String
name()
Authentication plugin name.Buffer
process(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence)
Process plugin authentication.String
type()
Authentication plugin type.
-
-
-
Method Detail
-
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
void initialize(String authenticationData, byte[] seed, Options options)
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
-
-