/** * @typedef {Object} PasetoIssuerConfig * @property {import('node:crypto').KeyObject | Uint8Array} secretKey Ed25519 secret (signing) * @property {import('node:crypto').KeyObject | Uint8Array} publicKey Ed25519 public (introspection) * @property {string | number} [expiresIn] access-token lifetime (default `'10m'`) */ /** * @param {PasetoIssuerConfig} config */ export function pasetoIssuer(config: PasetoIssuerConfig): { /** * @param {import('./jwt.js').AccessGrant} grant * @param {import('./jwt.js').GrantContext} ctx * @returns {Promise<{ accessToken: string, tokenType: string, expiresIn: number, jti: string }>} */ issue(grant: import("./jwt.js").AccessGrant, ctx: import("./jwt.js").GrantContext): Promise<{ accessToken: string; tokenType: string; expiresIn: number; jti: string; }>; /** * @param {string} token * @param {{ issuer: string }} ctx * @returns {Promise<{ active: boolean, claims?: Record }>} */ introspect(token: string, ctx: { issuer: string; }): Promise<{ active: boolean; claims?: Record; }>; }; export type PasetoIssuerConfig = { /** * Ed25519 secret (signing) */ secretKey: any | Uint8Array; /** * Ed25519 public (introspection) */ publicKey: any | Uint8Array; /** * access-token lifetime (default `'10m'`) */ expiresIn?: string | number | undefined; };