  The coronal magnetic field, despite its overwhelming importance to the
physics and dynamics of the corona, has only rarely been measured. Here, the
electron density maps derived from images acquired during the total solar
eclipse of August 21st, 2017 are employed to demonstrate a new technique to
measure the coronal magnetic fields. The strength of the coronal magnetic
fields is derived with a semiempirical formula relating the plasma magnetic
energy density to the gravitational potential energy. The resulting values are
compared with those provided by more advanced coronal field reconstruction
methods based on MHD simulations of the whole corona starting from photospheric
field measurements, finding a very good agreement. Other parameters such as the
plasma-$\beta$ and Alfv\'en velocity are also derived and compared with those
of MHD simulations. Moreover, the plane-of-sky (POS) orientation of the coronal
magnetic fields is derived from the observed inclination of the coronal
features in the filtered images, also finding a close agreement with magnetic
field reconstructions. Hence, this work demonstrates for the first time that
the 2D distribution of coronal electron densities measured during total solar
eclipses is sufficient to provide the coronal magnetic field strengths and
inclinations projected on the POS. These are among the main missing pieces of
information that limited so far our understanding of physical phenomena going
on in the solar corona.
