A JSON Web Token, or JWT, is used to send information that can be verified
and trusted by means of a digital signature. It comprises a compact and
URL-safe JSON object, which is cryptographically signed to verify its
authenticity, and which can also be encrypted if the payload contains sensitive
information.
JWTs can be signed using a secret (with the HMAC algorithm) or a
public/private key pair using RSA.
Because
of it’s compact structure, JWT is usually used in HTTP
Authorization
headers
or URL query parameters.