authenticating HTTP connections without user interaction

Waldo Bastian bastian at kde.org
Mon Jul 15 18:35:48 BST 2002


On Monday 15 July 2002 05:44 am, Best, Jan-Pascal van wrote:
> Hi there,
>
> Is there a way, when opening a HTTP/webdav connection,
> to provide a username/password? I tried adding them to
> the URL, but that way they aren't remembered for
> future connections. Besides, I don't like cleartext
> passwords in log files, where URLs are recorded. Is
> there a metadata somewhere that can be used? I looked
> at the http.cc sources, but could not find anything
> there. Maybe user/password pairs can be added to
> the kpasswd dcopserver?

You can call addAuthInfo via DCOP in kpasswd see 
SlaveBase::cacheAuthentication( const AuthInfo& info ) for an example. 
window-id should either be equal to topLevelWidget()->winId() in which case 
the password is cached for the existance of the main-window. 
Or the window-id can be 0 in which case you want to set the 
AuthInfo::keepPassword to true.

Cheers,
Waldo
-- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com





More information about the kfm-devel mailing list