  We introduce a canonical Chern-Weil map for possibly non-commutative
g-differential algebras with connection. Our main observation is that the
generalized Chern-Weil map is an algebra homomorphism ``up to g-homotopy''.
Hence, the induced map from invariant polynomials to the basic cohomology is an
algebra homomorphism. As in the standard Chern-Weil theory, this map is
independent of the choice of connection.
  Applications of our results include: a conceptually easy proof of the Duflo
theorem for quadratic Lie algebras, a short proof of a conjecture of Vogan on
Dirac cohomology, generalized Harish-Chandra projections for quadratic Lie
algebras, an extension of Rouviere's theorem for symmetric pairs, and a new
construction of universal characteristic forms in the Bott-Shulman complex.
