UNPKG

ltijs

Version:

Easily turn your web application into a LTI 1.3 Learning Tool.

10 lines (9 loc) • 484 B
import type { KeyObject } from 'node:crypto'; import jwt from 'jsonwebtoken'; import type { DecodedToken, TokenHeader } from '#utils/crypto/jwt.types'; export declare function decodeToken(token: string): { header: TokenHeader; payload: DecodedToken; }; export declare function verifyTokenSignature(token: string, key: string | KeyObject, algorithms: string[]): DecodedToken; export declare function signJwt(payload: object, secret: string, options?: jwt.SignOptions): string;