private Object executeWithPossibleReAuthentication(final Connection conn, final Op op)
      throws Exception {
    try {
      return conn.execute(op);
    } catch (final ServerConnectivityException sce) {
      final Throwable cause = sce.getCause();
      if ((cause instanceof AuthenticationRequiredException
          && USER_NOT_FOUND.equals(cause.getMessage()))
          || sce.getMessage().contains("Connection error while authenticating user")
          || cause instanceof AuthenticationExpiredException) {
        // 2nd exception-message above is from AbstractOp.sendMessage()

        if (pool.getMultiuserAuthentication()) {
          final UserAttributes ua = getUserAttributesFromThreadLocal();
          if (ua != null) {
            authenticateMultiuser(pool, conn, ua);
          }
        } else {
          final Connection wrappedConnection = conn.getWrappedConnection();
          conn.getServer().setUserId(AuthenticateUserOp.executeOn(wrappedConnection, this));
        }

        return conn.execute(op);
      } else {
        throw sce;
      }
    }
  }
This method will throw an exception if we need to stop the connection manager if there are
failures.
geode-core/src/main/java/org/apache/geode/cache/client/internal/OpExecutorImpl.java