function _getAssertion(aOptions, aCallback) {
    let audience = aOptions.origin;
    let email = aOptions.loggedInUser || this.getDefaultEmailForOrigin(audience);
    log("_getAssertion: audience:", audience, "email:", email);
    if (!audience) {
      throw "audience required for _getAssertion";
    }

    // We might not have any identity info for this email
    if (!this._store.fetchIdentity(email)) {
      this._store.addIdentity(email, null, null);
    }

    let cert = this._store.fetchIdentity(email)['cert'];
    if (cert) {
      this._generateAssertion(audience, email, function generatedAssertion(err, assertion) {
        if (err) {
          log("ERROR: _getAssertion:", err);
        }
        log("_getAssertion: generated assertion:", assertion);
        return aCallback(err, assertion);
      });
    }
  }
/**
   * Obtain a BrowserID assertion with the specified characteristics.
   *
   * @param aCallback
   *        (Function) Callback to be called with (err, assertion) where 'err'
   *        can be an Error or NULL, and 'assertion' can be NULL or a valid
   *        BrowserID assertion. If no callback is provided, an exception is
   *        thrown.
   *
   * @param aOptions
   *        (Object) An object that may contain the following properties:
   *
   *          "audience"      : The audience for which the assertion is to be
   *                            issued. If this property is not set an exception
   *                            will be thrown.
   *
   *        Any properties not listed above will be ignored.
   */
Obtain a BrowserID assertion with the specified characteristics.
@param aCallback
(Function) Callback to be called with (err, assertion) where 'err'
can be an Error or NULL, and 'assertion' can be NULL or a valid
BrowserID assertion. If no callback is provided, an exception is
thrown.

@param aOptions
(Object) An object that may contain the following properties.

"audience"      : The audience for which the assertion is to be
issued. If this property is not set an exception
will be thrown.

Any properties not listed above will be ignored.
Obtain a BrowserID assertion with the specified characteristics . @param aCallback ( Function ) Callback to be called with ( err assertion ) where ' err ' can be an Error or NULL and ' assertion ' can be NULL or a valid BrowserID assertion . If no callback is provided an exception is thrown . @param aOptions ( Object ) An object that may contain the following properties . " audience " : The audience for which the assertion is to be issued . If this property is not set an exception will be thrown . Any properties not listed above will be ignored .
function _getAssertion(aOptions, aCallback) {
    let audience = aOptions.origin;
    let email = aOptions.loggedInUser || this.getDefaultEmailForOrigin(audience);
    log("_getAssertion: audience:", audience, "email:", email);
    if (!audience) {
      throw "audience required for _getAssertion";
    }
    if (!this._store.fetchIdentity(email)) {
      this._store.addIdentity(email, null, null);
    }
    let cert = this._store.fetchIdentity(email)['cert'];
    if (cert) {
      this._generateAssertion(audience, email, function generatedAssertion(err, assertion) {
        if (err) {
          log("ERROR: _getAssertion:", err);
        }
        log("_getAssertion: generated assertion:", assertion);
        return aCallback(err, assertion);
      });
    }
  }
function _getAssertion ( aOptions , aCallback ) { let audience = aOptions . origin ; let email = aOptions . loggedInUser || this . getDefaultEmailForOrigin ( audience ) ; log ( "_getAssertion: audience:" , audience , "email:" , email ) ; if ( ! audience ) { throw "audience required for _getAssertion" ; } if ( ! this . _store . fetchIdentity ( email ) ) { this . _store . addIdentity ( email , null , null ) ; } let cert = this . _store . fetchIdentity ( email ) [ 'cert' ] ; if ( cert ) { this . _generateAssertion ( audience , email , function generatedAssertion ( err , assertion ) { if ( err ) { log ( "ERROR: _getAssertion:" , err ) ; } log ( "_getAssertion: generated assertion:" , assertion ) ; return aCallback ( err , assertion ) ; } ) ; } }
Obtain a BrowserID assertion with the specified characteristics.
Obtain a BrowserID assertion with the specified characteristics .
// We might not have any identity info for this email