By Tommy Marshall
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.
(jwt.io)
A standard for signing, sending and receiving tokens to validate something.
(me)
header.payload.signature
xxxxxx.yyyyyy.zzzzzz
Consists of two parts: the type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA.
Contains the data which is to be serialized and checked against.
A hash which is a serialized string consisting base64 encoded of the previous two parts of the token (headers and payload) and a secret that lives on the server.
You're going to need a Database call anyways in case a user's role/permission changes.
Using them for services that connect multiple 3rd party services can be useful!