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

x/jose/jwt/produce.ts>ProduceJWT#setExpirationTime

"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
method ProduceJWT.prototype.setExpirationTime
import { ProduceJWT } from "https://deno.land/x/jose@v4.13.0/jwt/produce.ts";

Set "exp" (Expiration Time) Claim.

Parameters

input: number | string

"exp" (Expiration Time) Claim value to set on the JWT Claims Set. When number is passed that is used as a value, when string is passed it is resolved to a time span and added to the current timestamp.