I'm using Tuupola to verify JWTs however how do I create them?

so I’m using Tuupola to verify certain routes and the JWTs associated with each route.

I’m not sure

  1. how to generate them in the first place.
  2. how to check if the token is getting old with each route choice and move the expiration time.
  3. get rid of the token when the logout route is achieved…

Links to libraries and tutorials appreciated…