lib/gitkitclient.js
function GitkitClient(options) {
  this.widgetUrl = options.widgetUrl;
  this.maxTokenExpiration = 86400 * 30; // 30 days
  this.audiences = [];
  if (options.projectId !== undefined) {
    this.audiences.push(options.projectId);
  }
  if (options.clientId !== undefined) {
    this.audiences.push(options.clientId);
  }
  if (this.audiences.length == 0) {
    throw new Error("Missing projectId or clientId in server configuration.");
  }
  this.authClient = new google.auth.JWT(
      options.serviceAccountEmail,
      options.serviceAccountPrivateKeyFile,
      options.serviceAccountPrivateKey,
      [GitkitClient.GITKIT_SCOPE],
      '');
  this.certificateCache = null;
  this.certificateExpiry = null;
}
function GitkitClient(options) {
  this.widgetUrl = options.widgetUrl;
  this.maxTokenExpiration = 86400 * 30; // 30 days
  this.audiences = [];
  if (options.projectId !== undefined) {
    this.audiences.push(options.projectId);
  }
  if (options.clientId !== undefined) {
    this.audiences.push(options.clientId);
  }
  if (this.audiences.length == 0) {
    throw new Error("Missing projectId or clientId in server configuration.");
  }
  this.authClient = new google.auth.JWT(
      options.serviceAccountEmail,
      options.serviceAccountPrivateKeyFile,
      options.serviceAccountPrivateKey,
      [GitkitClient.GITKIT_SCOPE],
      '');
  this.certificateCache = null;
  this.certificateExpiry = null;
}
function GitkitClient ( options ) { this . widgetUrl = options . widgetUrl ; this . maxTokenExpiration = 86400 * 30 ; // 30 days this . audiences = [ ] ; if ( options . projectId !== undefined ) { this . audiences . push ( options . projectId ) ; } if ( options . clientId !== undefined ) { this . audiences . push ( options . clientId ) ; } if ( this . audiences . length == 0 ) { throw new Error ( "Missing projectId or clientId in server configuration." ) ; } this . authClient = new google . auth . JWT ( options . serviceAccountEmail , options . serviceAccountPrivateKeyFile , options . serviceAccountPrivateKey , [ GitkitClient . GITKIT_SCOPE ] , '' ) ; this . certificateCache = null ; this . certificateExpiry = null ; }
Gitkit client constructor.

@param {object} options Options to be passed in
@constructor
Gitkit client constructor .