diff --git a/src/auth/keycloak-auth.guard.ts b/src/auth/keycloak-auth.guard.ts index 5aba027..1c3650e 100644 --- a/src/auth/keycloak-auth.guard.ts +++ b/src/auth/keycloak-auth.guard.ts @@ -1,11 +1,16 @@ -import { Injectable, UnauthorizedException } from '@nestjs/common'; +import { Injectable, Logger, UnauthorizedException } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import type { JwtPayload } from './keycloak.strategy'; @Injectable() export class KeycloakAuthGuard extends AuthGuard('jwt') { + private readonly logger = new Logger(KeycloakAuthGuard.name); + handleRequest(err: any, user: JwtPayload): TUser { + this.logger.log('KeycloakAuthGuard.handleRequest'); + console.log(user); + console.log(err); if (err || !user) { if (err instanceof UnauthorizedException) { throw err;