code: function parseCasResponse(casBody, logger, callback) {
    xml2js(casBody, {
      explicitRoot: false,
      tagNameProcessors: [stripPrefix]
    }, function(err, serviceResponse) {
      /* istanbul ignore if */
      if (err) {
        logger.error('Failed to parse CAS server response when trying to validate ticket.');
        logger.error(err);
        return callback(err, {
          message: 'Failed to parse CAS server response when trying to validate ticket.'
        });
      }
  
      if (!serviceResponse) {
        logger.error('Invalid CAS server response.');
        return callback(new Error('Invalid CAS server response, serviceResponse empty.'), {
          message: 'Invalid CAS server response, serviceResponse empty.'
        });
      }
  
      var success = serviceResponse.authenticationSuccess && serviceResponse.authenticationSuccess[0];
  
      if (!success) {
        logger.error('Receive response from CAS when validating ticket, but the validation is failed.');
        logger.error('Cas response:', serviceResponse);
        return callback(null, {});
      }
  
      var casResponse = {};
      for (var casProperty in success) {
        casResponse[casProperty] = success[casProperty][0];
      }
  
      return callback(null, casResponse);
    })
  }
docs: 从cas的响应的xml中解析出数据
  
  @param casBody
  @param logger
  @param callback