The XMPP server is now configured to use LDAP for authentication (on sm-labs01, and soon to be on services.mozilla too) so the xmpp username/password will now be the same as the weave username/password. So I now use those to login, and I got rid of the two extra preferences which we used to have for xmpp username/password.

This commit is contained in:
jonathandicarlo@jonathan-dicarlos-macbook-pro.local 2008-06-20 17:19:10 -07:00
parent 7d953f2669
commit 4489fb2ce3
2 changed files with 9 additions and 12 deletions

View File

@ -58,6 +58,7 @@ Cu.import("resource://weave/engines.js");
Cu.import("resource://weave/syncCores.js");
Cu.import("resource://weave/stores.js");
Cu.import("resource://weave/trackers.js");
Cu.import("resource://weave/identity.js");
/* LONGTERM TODO: when we start working on the ability to share other types
of data besides bookmarks, the xmppClient instance should be moved to hang
@ -120,18 +121,16 @@ BookmarksEngine.prototype = {
let serverUrl = Utils.prefs.getCharPref( "xmpp.server.url" );
let realm = Utils.prefs.getCharPref( "xmpp.server.realm" );
// TODO once we have ejabberd talking to LDAP, the username/password
// for xmpp will be the same as the ones for Weave itself, so we can
// read username/password like this:
// let clientName = ID.get('WeaveID').username;
// let clientPassword = ID.get('WeaveID').password;
// until then get these from preferences as well:
let clientName = Utils.prefs.getCharPref( "xmpp.client.name" );
let clientPassword = Utils.prefs.getCharPref( "xmpp.client.password" );
/* Username/password for XMPP are the same; as the ones for Weave,
so read them from the weave identity: */
let clientName = ID.get('WeaveID').username;
let clientPassword = ID.get('WeaveID').password;
let transport = new HTTPPollingTransport( serverUrl, false, 15000 );
let auth = new PlainAuthenticator();
// TODO use MD5Authenticator instead once we get it working -- plain is
// a security hole.
/* LONGTERM TODO would prefer to use MD5Authenticator instead,
once we get it working, but since we are connecting over SSL, the
Plain auth is probably fine for now. */
this._xmppClient = new XmppClient( clientName,
realm,
clientPassword,

View File

@ -36,5 +36,3 @@ pref("extensions.weave.xmpp.enabled", true);
pref("extensions.weave.xmpp.server.url",
"https://sm-labs01.mozilla.org:81/xmpp");
pref("extensions.weave.xmpp.server.realm", "sm-labs01.mozilla.org");
pref("extensions.weave.xmpp.client.name", "");
pref("extensions.weave.xmpp.client.password", "");