Concept Flow - JWT structure (header, payload, signature)
Create Header JSON
Base64Url Encode Header
Create Payload JSON
Base64Url Encode Payload
Combine Encoded Header + '.' + Encoded Payload
Sign Combined String with Secret Key
Base64Url Encode Signature
Final JWT: Header.Payload.Signature
This flow shows how a JWT is built step-by-step: header and payload are created and encoded, then signed to produce the signature, and all parts are combined.