@nxtoai/jwtette
Version:
JWT authentication package for NxtoAI microservices
14 lines (13 loc) • 536 B
TypeScript
import { GatiService } from '@nxtoai/gati';
export declare class JwtHelper {
private readonly gati;
private readonly TOKEN_PREFIX;
private readonly USER_TOKEN_PREFIX;
private readonly TOKEN_EXPIRY;
constructor(gati: GatiService);
cacheToken(token: string, userid: string): Promise<void>;
getTokenUser(token: string): Promise<string | null>;
getUserToken(userid: string): Promise<string | null>;
invalidateToken(token: string): Promise<void>;
invalidateUserToken(userid: string): Promise<void>;
}