function verified(err, user, info) {
    if (err) { return self.error(err); }
    if (!user) {
      if (typeof info == 'string') {
        info = { message: info }
      }
      info = info || {};
      return self.fail(self._challenge('invalid_token', info.message));
    }
    self.success(user, info);
  }
Authenticate request by verifying access token.

When a bearer token is sent in the request, it will be parsed and the verify
function will be called to verify the token and authenticate the request.  If
a token is not present, authentication will fail with the appropriate
challenge and status code.

This function is protected, and should not be called directly.  Instead,
use `passport.authenticate()` middleware and specify the {@link Strategy#name `name`}
of this strategy and any options.

@protected
@param {http.IncomingMessage} req - The Node.js {@link https://nodejs.org/api/http.html#class-httpincomingmessage `IncomingMessage`}
         object.

@example
passport.authenticate('bearer');