  We study the bound state spectrum and 0-$\pi$ transitions in ballistic
quasi-1D superconductor/ferromagnetic insulator/superconductor (S/FI/S)
Josephson junctions. In addition to the Andreev bound states, stemming from the
phase coherence, the magnetic barrier gives rise to qualitatively different
Yu-Shiba-Rusinov (YSR) bound states with genuine spectral features and spin
characteristics. We show that zero-energy YSR states are much more robust
against scalar tunneling than their Andreev counterparts and also fingerprint a
quantum phase transition from the junctions' 0 into the $\pi$ phase, connected
to a measurable reversal of the Josephson current flow; this coincidence
persists also in the presence of Rashba spin-orbit coupling.
