code: function validateService(res, url, callback) {
    if (debug) {
      console.log('Sending request to: "' + url + '" to validate ticket.');
    }
  
    fetch(url).then(function(res) {
        if (res.status == 200) {
          return res.text();
        } else {
          console.log('Receive response from cas when validating ticket, but request failed with status code: ' + casRes.statusCode + '!');
          res.status(401).send({
            message: 'Receive response from cas when validating ticket, but request failed with status code: ' + casRes.statusCode + '.'
          });
        }
      })
      .then(function(casBody) {
        if (casBody) {
          if (debug) {
            console.log('Receive response from CAS when validating ticket with status code 200, casBody: ', casBody);
          }
  
          callback(casBody);
        }
      })
      .catch(function(err) {
        console.log('Receive response from cas when validating ticket, but request failed!');
        console.error(err);
        return res.status(401).send({
          message: 'Receive response from cas when validating ticket, but request failed!',
          error: err
        });
      });
  
  }
docs: 校验ticket
  
  @param res
  @param url
  @param callback