Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Update src/auth/core/token.decorator.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian <[email protected]>
  • Loading branch information
tomwwinter and sleidig authored Feb 29, 2024
1 parent 23f00e1 commit 02ffc00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/auth/core/token.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { JwtTokenPayload } from './jwt-auth.guard';

/**
* Extract token payload for advanced checks.
*/
export const Token = createParamDecorator(
(data: unknown, ctx: ExecutionContext): JwtTokenPayload | undefined => {
const request = ctx.switchToHttp().getRequest();
Expand Down

0 comments on commit 02ffc00

Please sign in to comment.