Skip to content
Node: jsonwebtoken4 APIs

jwt

Package jwt provides sign, verify, and decode helpers around JSON Web Tokens. Node equivalent: jsonwebtoken.

import "github.com/sahilkhaire/gox/jwt"
## API reference

Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.

Functions

SymbolNode.jsKindSummary
Decodejwt.decode(token)funcDecode parses claims without verifying the signature (jwt.decode).
Signjwt.sign(payload, secret, { expiresIn })funcSign builds a signed JWT from claims (jwt.sign).
Verifyjwt.verify(token, secret)funcVerify parses and validates a JWT with secret (jwt.verify).

Types

SymbolNode.jsKindSummary
SignOptionstypeSignOptions configures token signing.

MIT Licensed · Built for Node.js developers moving to Go