title: How do I access getToken in
body: <p>In the <a href="https://github.com/auth0/express-jwt" rel="nofollow noreferrer">express-jwt docs</a> there is a reference to being able to use a getToken function to get the token from a request. </p>
  
  <p>How do you use this call in a route?</p>
  
  <pre><code>app.use(jwt({
    secret: 'hello world !',
    credentialsRequired: false,
    getToken: function fromHeaderOrQuerystring (req) {
      if (req.headers.authorization &amp;&amp; req.headers.authorization.split(' ')[0] === 'Bearer') {
          return req.headers.authorization.split(' ')[1];
      } else if (req.query &amp;&amp; req.query.token) {
        return req.query.token;
      }
      return null;
    }
  }));
  </code></pre>