basic authentication of KHTMLPart

Waldo Bastian bastian at kde.org
Tue Dec 23 14:49:17 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue December 23 2003 15:11, Andy Brice wrote:
> I have successfully embedded KHTMLPart in my Qt Application. But I am
> unable to send basic authentication through KHTMLPart. Consequently my user
> has to log on a second time in a KHTMLPart dialog. I've looked through
> various archives and surfed the web and I can't find anything useful.
>
> Does KHTMLPart allow basic authentication?

> If so, what is wrong with this code:

The metaData is not passed as-is to the remote server.

The easiest way might be to pass username and password via the URL. See 
KURL::setUser() / KURL::setPass()

Another option is to tell the password manager about the username/password. 
See the implementation of SlaveBase::cacheAuthentication() in slavebase.cpp 
for how to do that.

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/6FXuN4pvrENfboIRAmGgAJkBhdnS3vJY8f6wKFVcLxC6/t5mnwCcCF3Q
bAkC7x8fJatiLP6CpAG5AqE=
=ZDz9
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list