code: function checkAuth (auth) {
      if (util.isUndefined(auth)) {
          throw new CartoValidationError('\'auth\'', CartoValidationErrorTypes.MISSING_REQUIRED);
      }
      if (!util.isObject(auth)) {
          throw new CartoValidationError('\'auth\' property must be an object.', CartoValidationErrorTypes.INCORRECT_TYPE);
      }
      auth.username = util.isUndefined(auth.username) ? auth.user : auth.username; // backwards compatibility
      checkApiKey(auth.apiKey);
      checkUsername(auth.username);
  }
docs: Check a valid auth parameter.
  
  @param  {Object} auth