This commit is contained in:
13
lib/interfaces/token.interface.ts
Normal file
13
lib/interfaces/token.interface.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface TokenPayload {
|
||||
sub: string
|
||||
}
|
||||
|
||||
// роли храним в токене
|
||||
export interface TokenRolePayload {
|
||||
id: string | number
|
||||
name: string
|
||||
}
|
||||
|
||||
export type VerifyResult =
|
||||
| { valid: true; userId: string; jti: string; role: TokenRolePayload }
|
||||
| { valid: false; reason: string }
|
||||
Reference in New Issue
Block a user