File

lib/shared/guards/lite-auth.guard.ts

Description

An authentication guard that extends AbstractAuthGuard, used for lightweight authentication without user fetching.

Extends

AbstractAuthGuard

Index

Properties

Constructor

constructor(logger: Logger, userService: UserService, cacheService: CacheService)
Parameters :
Name Type Optional
logger Logger No
userService UserService No
cacheService CacheService No

Properties

Protected fetchUser
Default value : false
import { Inject, Injectable, Logger } from "@nestjs/common";
import { AbstractAuthGuard } from "./abstract-auth.guard";
import { LOGGER } from "../modules/log/log.constants";
import { UserService } from "../../common/user/user.types";
import { CacheService } from "../modules/cache/cache.types";

/**
 * An authentication guard that extends AbstractAuthGuard, used for lightweight authentication without user fetching.
 */
@Injectable()
export class LiteAuthGuard extends AbstractAuthGuard {
  protected fetchUser = false;

  constructor(
    @Inject(LOGGER) protected readonly logger: Logger,
    protected readonly userService: UserService,
    protected readonly cacheService: CacheService,
  ) {
    super();
  }
}

results matching ""

    No results matching ""