Package org.mariadb.jdbc.message.server
Class AuthSwitchPacket
- java.lang.Object
-
- org.mariadb.jdbc.message.server.AuthSwitchPacket
-
- All Implemented Interfaces:
org.mariadb.jdbc.message.ServerMessage
public class AuthSwitchPacket extends Object implements org.mariadb.jdbc.message.ServerMessage
Authentication switch packet. See https://mariadb.com/kb/en/connection/#authentication-switch-request
-
-
Constructor Summary
Constructors Constructor Description AuthSwitchPacket(String plugin, byte[] seed)Authentication switch constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthSwitchPacketdecode(org.mariadb.jdbc.client.ReadableByteBuf buf)Decode an AUTH_SWITCH_PACKET from a MYSQL packet.StringgetPlugin()Get authentication switch plugin informationbyte[]getSeed()Get authentication switch seed informationstatic byte[]getTruncatedSeed(byte[] seed)Get truncated seed (seed without ending 0x00 byte)
-
-
-
Constructor Detail
-
AuthSwitchPacket
public AuthSwitchPacket(String plugin, byte[] seed)
Authentication switch constructor- Parameters:
plugin- plugin requestedseed- plugin seed
-
-
Method Detail
-
decode
public static AuthSwitchPacket decode(org.mariadb.jdbc.client.ReadableByteBuf buf)
Decode an AUTH_SWITCH_PACKET from a MYSQL packet.- Parameters:
buf- packet- Returns:
- Authentication switch packet.
-
getPlugin
public String getPlugin()
Get authentication switch plugin information- Returns:
- plugin
-
getSeed
public byte[] getSeed()
Get authentication switch seed information- Returns:
- seed
-
getTruncatedSeed
public static byte[] getTruncatedSeed(byte[] seed)
Get truncated seed (seed without ending 0x00 byte)- Parameters:
seed- connection seed- Returns:
- truncated seed
-
-