Files
alrahma_sunday_school_api/apps/api/dist/security/tokens.d.ts
T
2026-06-11 03:22:12 -04:00

15 lines
642 B
TypeScript

import jwt from 'jsonwebtoken';
export type ActorType = 'admin' | 'employee' | 'renter';
export type ActorTokenPayload = jwt.JwtPayload & {
sub: string;
type: ActorType;
sessionVersion?: number;
last2faAt?: number;
};
export declare function signActorToken(actorId: string, actorType: ActorType, options?: Pick<jwt.SignOptions, 'expiresIn'> & {
sessionVersion?: number;
last2faAt?: number;
}): string;
export declare function verifyActorToken(token: string, expectedType: ActorType): ActorTokenPayload;
export declare function verifyAnyActorToken(token: string): ActorTokenPayload;
//# sourceMappingURL=tokens.d.ts.map