B2G/gecko/services/sync/modules/identity.js
/**
   * The current state of the auth credentials.
   *
   * This essentially validates that enough credentials are available to use
   * Sync.
   */
The current state of the auth credentials.
This essentially validates that enough credentials are available to use
Sync.
The current state of the auth credentials . This essentially validates that enough credentials are available to use Sync .
get currentAuthState() {
    if (!this.username) {
      return LOGIN_FAILED_NO_USERNAME;
    }
    if (Utils.mpLocked()) {
      return STATUS_OK;
    }
    if (!this.basicPassword) {
      return LOGIN_FAILED_NO_PASSWORD;
    }
    if (!this.syncKey) {
      return LOGIN_FAILED_NO_PASSPHRASE;
    }
    if (!this.syncKeyBundle) {
      return LOGIN_FAILED_INVALID_PASSPHRASE;
    }
    return STATUS_OK;
  }
get currentAuthState ( ) { if ( ! this . username ) { return LOGIN_FAILED_NO_USERNAME ; } if ( Utils . mpLocked ( ) ) { return STATUS_OK ; } if ( ! this . basicPassword ) { return LOGIN_FAILED_NO_PASSWORD ; } if ( ! this . syncKey ) { return LOGIN_FAILED_NO_PASSPHRASE ; } if ( ! this . syncKeyBundle ) { return LOGIN_FAILED_INVALID_PASSPHRASE ; } return STATUS_OK ; }
The current state of the auth credentials.
The current state of the auth credentials .
// If we have a Sync Key but no bundle, bundle creation failed, which // implies a bad Sync Key.