Skip to content

web-backend


Class: JwtAuthGuard

Defined in: packages/web-backend/src/guards/jwt-auth.guard.ts:10

JWT guard that honors the @Public() metadata to bypass authentication.

Extends

  • IAuthGuard

Implements

  • CanActivate

Constructors

Constructor

new JwtAuthGuard(reflector): JwtAuthGuard

Defined in: packages/web-backend/src/guards/jwt-auth.guard.ts:14

Parameters

reflector

Reflector

NestJS metadata reflector used to check @Public().

Returns

JwtAuthGuard

Overrides

AuthGuard("jwt").constructor

Methods

canActivate()

canActivate(context): boolean | Promise<boolean> | Observable<boolean>

Defined in: packages/web-backend/src/guards/jwt-auth.guard.ts:18

Parameters

context

ExecutionContext

Current execution context. Provides access to details about the current request pipeline.

Returns

boolean | Promise<boolean> | Observable<boolean>

Value indicating whether or not the current request is allowed to proceed.

Implementation of

CanActivate.canActivate

Overrides

AuthGuard("jwt").canActivate