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

x/jose/index.ts>ProduceJWT#setExpirationTime

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno.
Extremely Popular
Go to Latest
method ProduceJWT.prototype.setExpirationTime
import { ProduceJWT } from "https://deno.land/x/jose@v4.8.3/index.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.