function IDPChannel(aMessageCallback, aOptions) {
  let doNothing = function() {};
  this.debug = false;
  aOptions = aOptions || {};
  this.log = this.debug ? aOptions.logger || doNothing : doNothing;
  this.logError = this.debug ? function() { this.log("Error: " + arguments[0]); } : doNothing;
  this.log(aOptions);

  this.receiveResponse = aMessageCallback;

  this.provider = aOptions.provider;
  this.protocol = aOptions.protocol || "default";
  this.well_known = this.provider + '/.well-known/idp-proxy/' + this.protocol;
  this.contentWindow = null;
  try {
    Services.io.newURI(this.well_known, null, null).spec;
    this.init();
  }
  catch(e) {
    this.logError("Bad URL");
  }
  // XXX Try to get an assertion immediately
}
/*
 * IDPChannel: A message channel between the RTC PeerConnection and a
 * designated IdP Proxy.
 *
 * @param aMessageCallback  Callback to invoke to send messages back to
 *        (function)        the caller.
 *
 * @param aOptions          Options from caller, as well as overrides to
 *        (object)          make testing easier.
 *
 *                          PeerConnection.js may use any of the following
 *                          options:
 *
 *                          provider:  identity provider (e.g., example.com)
 *                          protocol:  identity protocol (e.g., browserid)
 *                          identity:  user identity (e.g., alice@example.com)
 */
A message channel between the RTC PeerConnection and a
designated IdP Proxy.

@param aMessageCallback  Callback to invoke to send messages back to
(function)        the caller.

@param aOptions          Options from caller, as well as overrides to
(object)          make testing easier.

PeerConnection.js may use any of the following
options.


A message channel between the RTC PeerConnection and a designated IdP Proxy . @param aMessageCallback Callback to invoke to send messages back to ( function ) the caller . @param aOptions Options from caller as well as overrides to ( object ) make testing easier . PeerConnection . js may use any of the following options .
function IDPChannel(aMessageCallback, aOptions) {
  let doNothing = function() {};
  this.debug = false;
  aOptions = aOptions || {};
  this.log = this.debug ? aOptions.logger || doNothing : doNothing;
  this.logError = this.debug ? function() { this.log("Error: " + arguments[0]); } : doNothing;
  this.log(aOptions);
  this.receiveResponse = aMessageCallback;
  this.provider = aOptions.provider;
  this.protocol = aOptions.protocol || "default";
  this.well_known = this.provider + '/.well-known/idp-proxy/' + this.protocol;
  this.contentWindow = null;
  try {
    Services.io.newURI(this.well_known, null, null).spec;
    this.init();
  }
  catch(e) {
    this.logError("Bad URL");
  }
}
function IDPChannel ( aMessageCallback , aOptions ) { let doNothing = function ( ) { } ; this . debug = false ; aOptions = aOptions || { } ; this . log = this . debug ? aOptions . logger || doNothing : doNothing ; this . logError = this . debug ? function ( ) { this . log ( "Error: " + arguments [ 0 ] ) ; } : doNothing ; this . log ( aOptions ) ; this . receiveResponse = aMessageCallback ; this . provider = aOptions . provider ; this . protocol = aOptions . protocol || "default" ; this . well_known = this . provider + '/.well-known/idp-proxy/' + this . protocol ; this . contentWindow = null ; try { Services . io . newURI ( this . well_known , null , null ) . spec ; this . init ( ) ; } catch ( e ) { this . logError ( "Bad URL" ) ; } }
IDPChannel: A message channel between the RTC PeerConnection and a
 designated IdP Proxy.
IDPChannel : A message channel between the RTC PeerConnection and a designated IdP Proxy .
// XXX Try to get an assertion immediately