Interface AuthenticationPlugin

    • Method Detail

      • name

        java.lang.String name()
        Authentication plugin name.
        Returns:
        authentication plugin name. ex: Mysql native password
      • type

        java.lang.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​(java.lang.String authenticationData,
                        byte[] seed,
                        Options options)
        Plugin initialization.
        Parameters:
        authenticationData - authentication data (password/token)
        seed - server provided seed
        options - Connection string options
      • process

        Buffer process​(PacketOutputStream out,
                       PacketInputStream in,
                       java.util.concurrent.atomic.AtomicInteger sequence)
                throws java.io.IOException,
                       java.sql.SQLException
        Process plugin authentication.
        Parameters:
        out - out stream
        in - in stream
        sequence - packet sequence
        Returns:
        response packet
        Throws:
        java.io.IOException - if socket error
        java.sql.SQLException - if plugin exception