Token payload interface for JWT token generation
This interface defines the user information structure used to create JWT tokens. It contains essential user identification and authorization data that gets encoded into both access and refresh tokens for authentication and authorization purposes.
TokenPayload
// Creating token payload for JWT generationconst payload: TokenPayload = { userId: 'user-uuid-123', email: 'user@example.com', role: 'student'}; Copy
// Creating token payload for JWT generationconst payload: TokenPayload = { userId: 'user-uuid-123', email: 'user@example.com', role: 'student'};
Token payload interface for JWT token generation
This interface defines the user information structure used to create JWT tokens. It contains essential user identification and authorization data that gets encoded into both access and refresh tokens for authentication and authorization purposes.
TokenPayload
Example