index.js
function Strategy (options, verify) {
  if (typeof options === 'function') {
    verify = options
    options = {}
  } else {
    if (options && options.log) {
      log = options.log
    }
  }
  if (!verify) {
    throw new Error('apikey authentication strategy requires a verify function')
  }

  passport.Strategy.call(this)

  this._apiKeyHeader = options.apiKeyHeader || 'api_key'
  this.name = 'apikey'
  this._verify = verify
  this._passReqToCallback = true
}
function Strategy (options, verify) {
  if (typeof options === 'function') {
    verify = options
    options = {}
  } else {
    if (options && options.log) {
      log = options.log
    }
  }
  if (!verify) {
    throw new Error('apikey authentication strategy requires a verify function')
  }

  passport.Strategy.call(this)

  this._apiKeyHeader = options.apiKeyHeader || 'api_key'
  this.name = 'apikey'
  this._verify = verify
  this._passReqToCallback = true
}
function Strategy ( options , verify ) { if ( typeof options === 'function' ) { verify = options options = { } } else { if ( options && options . log ) { log = options . log } } if ( ! verify ) { throw new Error ( 'apikey authentication strategy requires a verify function' ) } passport . Strategy . call ( this ) this . _apiKeyHeader = options . apiKeyHeader || 'api_key' this . name = 'apikey' this . _verify = verify this . _passReqToCallback = true }
Creates an instance of `Strategy` checking api keys.
Creates an instance of Strategy checking api keys .