title: Passport JWT Strategy not getting called
body: <p>I am trying to authorise my JWT token with passport middleware but the strategy callback function is not getting called.</p>
  
  <p>In my <code>app.js</code> file, I am specifying for my <code>/users</code> routes to use the middleware like so:</p>
  
  <pre><code>app.use('/users', passport.authenticate('jwt', { session: false }), users);
  </code></pre>
  
  <p>I then have a seperate file <code>./passport.js</code> (which I have required at the top of my <code>app.js</code>) where I specify my passport strategy:</p>
  
  <pre><code>passport.use(new JWTStrategy({
          jwtFromRequest: ExtractJWT.fromAuthHeaderAsBearerToken(),
          secretOrKey   : 'jwt_secret_key'
      },
      function (jwtPayload, cb) {
          console.log('jwtPayload', jwtPayload)
      }
  ));
  </code></pre>
  
  <p>I can't get the console log to run though.</p>
  
  <p>I am using postman to test this and have selected <code>Bearer Token</code> from the authorization options. I can see that this is adding a header to my request.</p>
  
  <p>When I log my request object in my node app, I can see it looks like this:</p>
  
  <pre><code>headers: { 
      authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YWM0YWI2ZTk1MWJiMjE1M2NhMjc0OWUiLCJmaXJzdF9uYW1lIjoiQW5kcmV3IiwibGFzdF9uYW1lIjoiTWNDYWxsdW0iLCJlbWFpbCI6ImFtY2NhbGx1bTg5QGdtYWlsLmNvbSIsImlhdCI6MTUyMjg0NzEyNSwiZXhwIjoxNTIyODUwNzI1fQ.WH12GJHMGrGsiJNIwUG2Dx_a9cZKjw7_SW8FYlEvLmk',
      accept: '*/*',
      host: 'localhost:3037',
  },
  </code></pre>
  
  <p>So the middleware should detect the bearer token and call the middleware?</p>
  
  <p>Any help would be appreciated</p>