<commit_before>exports = module.exports = function() {
  
  return function() {
    return require('cookie-parser')();
  };
};

exports['@implements'] = 'http://i.bixbyjs.org/http/middleware/parseCookies';
exports['@singleton'] = true;<commit_msg>Fetch secret for signed cookies.<commit_after>exports = module.exports = function(keyring) {
  
  return new Promise(function(resolve, reject) {
    var hostname = 'www';
  
    // NOTE: secret will be shared between this and express-session, due to same hostname
    keyring.get(hostname, function(err, cred) {
      if (err) { return reject(err); }
      if (!cred) { return reject(new Error("Cannot find credentials for '" + hostname + "'")); }
      
      var secret = cred.password;
      
      resolve(function() {
        return require('cookie-parser')(secret);
      });
    });
    
  }); // new Promise
};

exports['@implements'] = 'http://i.bixbyjs.org/http/middleware/parseCookies';
exports['@singleton'] = true;
exports['@require'] = [
  'http://i.bixbyjs.org/security/CredentialsStore'
];
{'fraction_non_alphanumeric': 0.16539923954372623, 'fraction_numerical': 0.0, 'mean_word_length': 3.538793103448276, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3687761', 'n_tokens_mistral': 325, 'n_tokens_neox': 323, 'n_words': 67}