UNPKG

@yash112/jwt-library

Version:

Encode, Decode & Validate JSON Web Token (JWTs)

10 lines (9 loc) 287 B
export interface JWTPayload { id: string | number; exp?: number; [key: string]: any; } export declare function sign(payload: JWTPayload, secret: string, options: { expiresIn?: number; }): string; export declare function verify(token: string, secret: string): JWTPayload;