jwt
Package jwt provides sign, verify, and decode helpers around JSON Web Tokens. Node equivalent: jsonwebtoken.
import "github.com/sahilkhaire/gox/jwt"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Decode | jwt.decode(token) | func | Decode parses claims without verifying the signature (jwt.decode). |
| Sign | jwt.sign(payload, secret, { expiresIn }) | func | Sign builds a signed JWT from claims (jwt.sign). |
| Verify | jwt.verify(token, secret) | func | Verify parses and validates a JWT with secret (jwt.verify). |
Types
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| SignOptions | — | type | SignOptions configures token signing. |