Signature verification
A compact JWT normally has three base64url-encoded sections separated by periods. The signed content is the encoded header, a period, and the encoded payload. For HMAC, validation needs the identical shared secret used to create the signature. For RSA or EC, it needs the public key corresponding to the signing private key. Changing either signed section causes verification to fail. Each section uses base64url text without '=' padding.