code: public Buffer process(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence) throws IOException, SQLException {
      Buffer buffer = new Buffer(authData);
  
      final String serverSpn = buffer.readStringNullEnd(StandardCharsets.UTF_8);
      //using provided connection string SPN if set, or if not, using to server information
      final String servicePrincipalName = (optionServicePrincipalName != null && !optionServicePrincipalName.isEmpty())
          ? optionServicePrincipalName : serverSpn;
      String mechanisms = buffer.readStringNullEnd(StandardCharsets.UTF_8);
      if (mechanisms.isEmpty()) {
        mechanisms = "Kerberos";
      }
  
      gssapiAuth.authenticate(out, in, sequence, servicePrincipalName, mechanisms);
  
      buffer = in.getPacket(true);
      sequence.set(in.getLastPacketSeq());
      return buffer;
    }
docs: Process gssapi plugin authentication.
  see https://mariadb.com/kb/en/library/authentication-plugin-gssapi/
  
  @param out       out stream
  @param in        in stream
  @param sequence  packet sequence
  @return response packet
  @throws IOException  if socket error
  @throws SQLException if plugin exception