JSON Web Token implementation with asynchronicity