Skip to content

Commit f3f4978

Browse files
bug: support object id in JWT interface
1 parent 1012813 commit f3f4978

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/types/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Request } from 'express';
22
import { JwtPayload } from 'jsonwebtoken';
3+
import { MongoAbility } from '@casl/ability';
34

45
export interface AuthenticatedRequest extends Request {
56
user?: {
@@ -8,6 +9,7 @@ export interface AuthenticatedRequest extends Request {
89
role: string;
910
firstName: string;
1011
};
12+
authorization?: MongoAbility<any>;
1113
}
1214

1315
export interface JWTPayload extends JwtPayload {

0 commit comments

Comments
 (0)