| Method / property | What it does |
| JsonWebToken.parse(text), new JsonWebToken(text) | Decodes a token; throws with a readable message. Whitespace inside the token is ignored. |
| header, payload, payloadIsJson | The decoded header and payload (the payload as text when it isn't JSON). |
| signature, signingInput, algorithm, segments | The signature bytes, "header.payload", the header's alg, and the three Base64URL segments. |
| await token.verify(key, { secretIsBase64 }) | Whether the signature matches. key is the HMAC secret, a PEM public key or a JWK. |
| await token.sign(key, { secretIsBase64 }) | The token text with a new signature (a PEM private key or private JWK for asymmetric algorithms). |
| JsonWebToken.encode(header, payload) | "header.payload" in Base64URL, unsigned. |
| JsonWebToken.claimStatus(payload, now) | { kind, text }: expired, not yet valid, or when it expires; null without exp / nbf. |
| JsonWebToken.relativeTime(seconds) | "in 3 hours", "2 days ago". |
| JsonWebToken.ALGORITHMS, JsonWebToken.TIME_CLAIMS | The supported algorithms; the claims that hold Unix times. |