import { ExecutionContext, Injectable, Logger, UnauthorizedException, } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; /** * JWT Auth Guard stub. * Cognito JWT verification has been removed. * This guard now always rejects -- all auth should go through * NostrSessionJwtGuard or NostrAuthGuard via the HybridAuthGuard. * * Kept for API compatibility with endpoints that still reference JwtAuthGuard. */ @Injectable() export class JwtAuthGuard extends AuthGuard('jwt') { async canActivate(context: ExecutionContext): Promise { Logger.warn( 'JwtAuthGuard.canActivate called -- Cognito is disabled. Use Nostr auth.', ); throw new UnauthorizedException( 'Cognito authentication is disabled. Use Nostr login.', ); } }