Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jose/jwt/produce.ts>ProduceJWT

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Go to Latest
class ProduceJWT
import { ProduceJWT } from "https://deno.land/x/jose@v4.13.0/jwt/produce.ts";

Generic class for JWT producing.

Constructors

new
ProduceJWT(payload: JWTPayload)

Properties

protected
_payload: JWTPayload

Methods

setAudience(audience: string | string[])

Set "aud" (Audience) Claim.

setExpirationTime(input: number | string)

Set "exp" (Expiration Time) Claim.

setIssuedAt(input?: number)

Set "iat" (Issued At) Claim.

setIssuer(issuer: string)

Set "iss" (Issuer) Claim.

setJti(jwtId: string)

Set "jti" (JWT ID) Claim.

setNotBefore(input: number | string)

Set "nbf" (Not Before) Claim.

setSubject(subject: string)

Set "sub" (Subject) Claim.