I have implemented basic HTTP authentication for the QGIS WMS provider
and am looking for some volunteers to test it. The changes have not been
committed to the QGIS SVN repository. Testing will require
compiling from source.
When creating or editing WMS connection in QGIS you can now specify an
optional username and password to be used with a protected WMS. These
are stored in your QGIS settings. If you don't want the password stored
you can leave it blank and be prompted for it at connection time.
I haven't had time to prepare a set of patches but you can download the
source tree (20Mb) that includes the WMS authentication from: