code: function createBasicAuth(username, password) {
  
    if (!username) {
      throw new Error('<username> required');
    }
  
    if (typeof password === 'undefined') {
      throw new Error('<password> required');
    }
  
    const token = base64encode(`${username}:${password}`);
  
    return auth('Basic', token);
  }
docs: Set username + password credentials on Engine API requests.
  
  @example
  
  Worker(engineEndpoint, {
  use: [
  BasicAuth('Walt', 'SECRET_PASSWORD')
  ]
  });