The request comes back 401. The token sits in the Authorization header, a long string of letters and dots that looks like the one that worked an hour ago.
So you go looking for a way to read it. That search is where most JWT debugging goes wrong, because reading a token and trusting a token are two very different acts.
Three parts, two dots
A JSON Web Token is a string built from three parts joined by dots. The parts are the header, the payload, and the signature, and RFC 7519 defines the format.
Here is the demo token from jwt.io, the one used in their introduction:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Enter fullscreen mode
Exit fullscreen mode
It is public sample data for a fake user named John Doe. Print it, paste it, take it apart. Nobody gets hurt.
Each part is base64url encoded.…