Commit 16f04627 by Percy Quispe Huarcaya

feat: Adding token creator and a parser

parent de7ac91a
import { JwtPayload } from "jsonwebtoken";
/**
JwtPayload
[key: string]: any;
iss?: string | undefined;
sub?: string | undefined;
aud?: string | string[] | undefined;
exp?: number | undefined;
nbf?: number | undefined;
iat?: number | undefined;
jti?: string | undefined;
*/
declare module 'security-ndjs-lib' {
export function createJWT(id: string, subject: object, time?: number): string;
export function parseJWT(token?: string, id?: string): JwtPayload; // Adjust the signature if needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment