Safety

Handle what goes wrong, check what a token claims, and know the bounds every call works within.

Every token, key and session function in unjwt throws one kind of error when something goes wrong: a JWTError with a short code your code can branch on. Claims are checked by default, so an expired token never verifies unless you say so. And the work one token can make your server do is bounded: when a token asks for more, the call refuses it instead of trying harder.