code: function createHeaders(options) {
    const opts = Object.assign({}, options);
    const headers = Object.assign({}, defaultHeaders, lowercaseKeys(opts.headers || {}));
  
    if (!opts.bearer && !opts.token && !opts.username && !opts.password) {
      return headers;
    }
  
    if (opts.token) {
      headers['authorization'] = 'token ' + opts.token;
      return headers;
    }
  
    if (opts.bearer) {
      headers['authorization'] = 'Bearer ' + opts.bearer;
      return headers;
    }
  
    const creds = opts.username + ':' + opts.password;
    headers['authorization'] = 'Basic ' + toBase64(creds);
    return headers;
  }
docs: Create auth string - token, Bearer or Basic Auth