Files
passport/lib/interfaces/token.interface.ts
Дмитрий be1e21e699
Some checks failed
Publish / Publish Job (push) Failing after 37s
first commit
2026-03-27 10:38:23 +03:00

14 lines
298 B
TypeScript

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 }