archetecture security fix
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user