function signIn(account) {
    Logger.AssertTrue(account["username"], "Username has been found");
    Logger.AssertTrue(account["password"], "Password has been found");
    Logger.AssertTrue(account["passphrase"], "Passphrase has been found");

    Logger.logInfo("Logging in user: " + account["username"]);

    Weave.Service.identity.account = account["username"];
    Weave.Service.identity.basicPassword = account["password"];
    Weave.Service.identity.syncKey = account["passphrase"];

    if (Weave.Status.login !== Weave.LOGIN_SUCCEEDED) {
      Logger.logInfo("Logging into Weave.");
      Weave.Service.login();
      Logger.AssertEqual(Weave.Status.login, Weave.LOGIN_SUCCEEDED,
                         "Weave logged in");

      // Bug 997279: Temporary workaround until we can ensure that Sync itself
      // sends this notification for the first login attempt by TPS
      Weave.Svc.Obs.notify("weave:service:setup-complete");
    }

    return true;
  }
/**
   * Wrapper to synchronize the login of a user
   *
   * @param account
   *        Account information of the user to login
   * @param account.username
   *        The username for the account (utf8)
   * @param account.password
   *        The user's password
   * @param account.passphrase
   *        The users's passphrase
   */
Wrapper to synchronize the login of a user
@param account
Account information of the user to login
@param account.username
The username for the account (utf8)
@param account.password
The user's password
@param account.passphrase
The users's passphrase
Wrapper to synchronize the login of a user @param account Account information of the user to login @param account . username The username for the account ( utf8 ) @param account . password The user ' s password @param account . passphrase The users ' s passphrase
function signIn(account) {
    Logger.AssertTrue(account["username"], "Username has been found");
    Logger.AssertTrue(account["password"], "Password has been found");
    Logger.AssertTrue(account["passphrase"], "Passphrase has been found");
    Logger.logInfo("Logging in user: " + account["username"]);
    Weave.Service.identity.account = account["username"];
    Weave.Service.identity.basicPassword = account["password"];
    Weave.Service.identity.syncKey = account["passphrase"];
    if (Weave.Status.login !== Weave.LOGIN_SUCCEEDED) {
      Logger.logInfo("Logging into Weave.");
      Weave.Service.login();
      Logger.AssertEqual(Weave.Status.login, Weave.LOGIN_SUCCEEDED,
                         "Weave logged in");
      Weave.Svc.Obs.notify("weave:service:setup-complete");
    }
    return true;
  }
function signIn ( account ) { Logger . AssertTrue ( account [ "username" ] , "Username has been found" ) ; Logger . AssertTrue ( account [ "password" ] , "Password has been found" ) ; Logger . AssertTrue ( account [ "passphrase" ] , "Passphrase has been found" ) ; Logger . logInfo ( "Logging in user: " + account [ "username" ] ) ; Weave . Service . identity . account = account [ "username" ] ; Weave . Service . identity . basicPassword = account [ "password" ] ; Weave . Service . identity . syncKey = account [ "passphrase" ] ; if ( Weave . Status . login !== Weave . LOGIN_SUCCEEDED ) { Logger . logInfo ( "Logging into Weave." ) ; Weave . Service . login ( ) ; Logger . AssertEqual ( Weave . Status . login , Weave . LOGIN_SUCCEEDED , "Weave logged in" ) ; Weave . Svc . Obs . notify ( "weave:service:setup-complete" ) ; } return true ; }
Wrapper to synchronize the login of a user
 @param account
        Account information of the user to login
 @param account.username
        The username for the account (utf8)
 @param account.password
        The user's password
 @param account.passphrase
        The users's passphrase
Wrapper to synchronize the login of a user @param account Account information of the user to login @param account . username The username for the account ( utf8 ) @param account . password The user ' s password @param account . passphrase The users ' s passphrase
// Bug 997279: Temporary workaround until we can ensure that Sync itself // sends this notification for the first login attempt by TPS