@kwiz/common
Version:
KWIZ common utilities and helpers for M365 platform
12 lines (11 loc) • 528 B
TypeScript
import { IDictionary } from "../types/common.types";
/** use the jose library from @kwiz/node for server apps */
export declare function sign<T extends IDictionary<string | number | boolean | string[]>>(jwtSecret: string, payload: T, options?: {
exp?: number | string | Date;
}): string;
/** use the jose library from @kwiz/node for server apps */
export declare function unsign<T>(jwtSecret: string, token: string): T;
export declare function isSignatureExpired(unsigned: {
exp?: number;
iat?: number;
}): boolean;