hi,
i'm implementing a subset of webdav client functionality as a xpcom
component
written in javascript.
for the webdav lock ownership property i need to retrieve the
name of the user currently authenticated in the browser session.
i tried:
<code>
var authmanager = getService("@mozilla.org/network/http-auth-manager;1",
"nsIHttpAuthManager");
var uri = createInstance("@mozilla.org/network/standard-url;1",
"nsIURI");
uri.spec = "http://same.uri.as.in.current.browser/"
if(uri.port = -1) uri.port = 80;
var userdomain;
var username;
var userpassword;
authmanager.getAuthIdentity(uri.scheme, uri.host, uri.port,
null, null, uri.path,
userdomain, username, userpassword);
</code>
as result i get an exception with NS_ERROR_NOT_AVAILABLE error.
looking at mozilla lxr, it seems it cannot find the
specified uri in the auth-cache, but my uri is correct and the same
as for which i'm authenticated in the browser window.
any hints on how to retrieve the username currently authenticated
in the browser?
TIA,
/ pit
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom