title: Passport-jwt token expiration
body: <p>I am using passport-jwt to generate my tokens but I noticed that the tokens never expire, is there any way to invalidate a particular token according to a rule set for me, something like:</p>
  
  <pre><code>'use strict';
  const passport = require('passport');
  const passportJWT = require('passport-jwt');
  const ExtractJwt = passportJWT.ExtractJwt;
  const Strategy = passportJWT.Strategy;
  const jwt = require('../jwt');
  const cfg = jwt.authSecret();
  
  const params = {
      secretOrKey: cfg.jwtSecret,
      jwtFromRequest: ExtractJwt.fromAuthHeader()
  };
  
  module.exports = () =&gt; {
      const strategy = new Strategy(params, (payload, done) =&gt; {
          //TODO: Create a custom validate strategy
          done(null, payload);
      });
      passport.use(strategy);
      return {
          initialize: function() {
              return passport.initialize();
          },
          authenticate: function() {
              //TODO: Check if the token is in the expired list
              return passport.authenticate('jwt', cfg.jwtSession);
          }
      };
  };
  </code></pre>
  
  <p>or some strategy to invalidate some tokens</p>