Class 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 Detail

      • AuthSwitchPacket

        public AuthSwitchPacket​(String plugin,
                                byte[] seed)
        Authentication switch constructor
        Parameters:
        plugin - plugin requested
        seed - 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