function Strategy(options, verify) {
  if (typeof options == 'function') {
    verify = options;
    options = {};
  }
  if (!verify) { throw new TypeError('HTTPBearerStrategy requires a verify function'); }
  
  passport.Strategy.call(this);
  
  /** The name of the strategy, set to `'bearer'`.
   *
   * @type {string}
   * @readonly
   */
  this.name = 'bearer';
  this._verify = verify;
  this._realm = options.realm || 'Users';
  if (options.scope) {
    this._scope = (Array.isArray(options.scope)) ? options.scope : [ options.scope ];
  }
  this._passReqToCallback = options.passReqToCallback;
}
Create a new `Strategy` object.

@classdesc This `Strategy` authenticates HTTP requests that use the Bearer
authentication scheme, as specified by {@link https://www.rfc-editor.org/rfc/rfc6750 RFC 6750}.

The bearer token credential can be sent in the HTTP request in one of three
different ways.  Preferably, the token is sent in the "Authorization" header
field:

```http
GET /resource HTTP/1.1
Host: server.example.com
Authorization: Bearer mF_9.B5f-4.1JqM
```

Alternatively, the token can be sent in a form-encoded body, using the
`access_token` parameter:

```http
POST /resource HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

access_token=mF_9.B5f-4.1JqM
```

Or, in the URL, using the `access_token` query parameter:

```http
GET /resource?access_token=mF_9.B5f-4.1JqM HTTP/1.1
Host: server.example.com
```

@public
@class
@augments base.Strategy
@param {Object} [options]
@param {string} [options.realm='Users'] - Value indicating the protection
         space over which credentials are valid.
@param {string} [options.scope] - Value indicating required scope needed to
         access protected resources.
@param {boolean} [options.passReqToCallback=false] - When `true`, the
         `verify` function receives the request object as the first argument,
         in accordance with the `{@link Strategy~verifyWithReqFn}` signature.
@param {Strategy~verifyFn|Strategy~verifyWithReqFn} verify - Function which
         verifies access token.

@example
var BearerStrategy = require('passport-http-bearer').Strategy;

new BearerStrategy(function(token, cb) {
  tokens.findOne({ value: token }, function(err, claims) {
    if (err) { return cb(err); }
    if (!claims) { return cb(null, false); }

    users.findOne({ id: claims.userID }, function (err, user) {
      if (err) { return cb(err); }
      if (!user) { return cb(null, false); }
      return cb(null, user, { scope: claims.scope });
    });
  });
});