FYI This example is modified base on THIS POST I replaced the depending packages with the latest JWT 4.0 version, as some of the decorators name ware changed in the latest version. You can find the details in CHANGE GUIDE