Skip to content

JWT token authentication

Joshua Thijssen edited this page Nov 1, 2020 · 1 revision

We have implemented a "sliding block" system.

JWT token time will be fixed on a 30 second block. So between 12:34:30 and 12:34:59, that block is the 12:34:30 block.

We issue a token that is valid starting from 1 block before the current block, and 1 block AFTER the current block.

This means that on 12:34:53 (the 12:34:30 block),.. we issue a token from 12:34:00 to 12:35:30. This will always gets use a minimum of 30 seconds before, and 30 seconds after range, without generating a new token every second.

40        70          100       130        160        190
+----------+-----------+----------+---------+----------+
|              *                  |
|                     *           | 
           |           *                    |
           |                    *           |
                       |           *                   |
Clone this wiki locally