title: python: API token generation with itsdangerous
body: <p>I'm following the "Flask Web Development" book to implement token based authentication. Basically, user authenticate his/herself with HTTP basic auth and a token is generated for it:</p>
  
  <pre><code>s = Serializer(app.config['SECRET_KEY'], expires_in = 3600)
  token = s.dumps({ 'id': user.id })
  </code></pre>
  
  <p>But it looks like this doesn't change as long as the <code>id</code> and <code>SECRET_KEY</code> stay the same. I understand that the transaction will be through HTTPS but still think a dynamic token would be better. How to achieve a dynamic token?</p>