Skip to main content
Module

x/jose/index.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@v5.1.3/index.ts";

Generic class for JWT producing.

Constructors

new
ProduceJWT(payload?: JWTPayload)

Properties

protected
_payload: JWTPayload

Methods

setAudience(audience: string | string[])

Set the "aud" (Audience) Claim.

setExpirationTime(input: number | string | Date)

Set the "exp" (Expiration Time) Claim.

setIssuedAt(input?: number | Date)

Set the "iat" (Issued At) Claim.

setIssuer(issuer: string)

Set the "iss" (Issuer) Claim.

setJti(jwtId: string)

Set the "jti" (JWT ID) Claim.

setNotBefore(input: number | string | Date)

Set the "nbf" (Not Before) Claim.

setSubject(subject: string)

Set the "sub" (Subject) Claim.