JWT Authentication of REST API

I hacked this together using a custom REST API request for the authentication (instead of putting authentication into the resource), and then using javascript functions to decode / encode the JWT token with the content you want