<commit_before>exports = module.exports = function(container) {
  var passport = require('passport');
  
  var authenticator = new passport.Authenticator();
  
  //console.log('HERE IS THE SPEC TABLE:');
  // TODO: There's a lot of duplicated stuff in these records, clean it up
  //console.log(container.specs())
  
  var specs = container.specs()
    , spec, provides
    , i, len;
  for (i = 0, len = specs.length; i < len; ++i) {
    spec = specs[i];
    provides = spec.a['@provides'] || [];
    if (typeof provides == 'string') {
      provides = [ provides ];
    }
    if (provides.indexOf('http://i.bixbyjs.org/http/authentication/Scheme') !== -1) {
      // This specification declares an HTTP authentication scheme.  Create the
      // scheme and use it as a plugin to the Passport `Authenticator`.
      var scheme = container.create(spec.id);
      authenticator.use(spec.a['@name'] || scheme.name, scheme);
    }
  }
  
  return authenticator;
}


exports['@provides'] = 'http://i.bixbyjs.org/express/Authenticator';
// TODO: Require by interface
exports['@require'] = [ '$container' ];
exports['@singleton'] = true;
<commit_msg>provides -> implements.<commit_after>exports = module.exports = function(container) {
  var passport = require('passport');
  
  var authenticator = new passport.Authenticator();
  
  //console.log('HERE IS THE SPEC TABLE:');
  // TODO: There's a lot of duplicated stuff in these records, clean it up
  //console.log(container.specs())
  
  var specs = container.specs()
    , spec, i, len;
  for (i = 0, len = specs.length; i < len; ++i) {
    spec = specs[i];
    if ((spec.implements || []).indexOf('http://i.bixbyjs.org/http/authentication/Scheme') !== -1) {
      // This specification declares an HTTP authentication scheme.  Create the
      // scheme and use it as a plugin to the Passport `Authenticator`.
      var scheme = container.create(spec.id);
      authenticator.use(spec.a['@name'] || scheme.name, scheme);
    }
  }
  
  return authenticator;
}


exports['@implements'] = 'http://i.bixbyjs.org/express/Authenticator';
// TODO: Require by interface
exports['@require'] = [ '$container' ];
exports['@singleton'] = true;

{'fraction_non_alphanumeric': 0.15902841429880843, 'fraction_numerical': 0.0018331805682859762, 'mean_word_length': 3.314229249011858, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7618636', 'n_tokens_mistral': 701, 'n_tokens_neox': 680, 'n_words': 183}