import { AuthGuard } from '@nestjs/passport';
class JwtGuard extends AuthGuard('jwt') {
async canActivate(context: ExecutionContext) {
super.canActivate(context);
}
handleRequest(err, user, info) {
}
}
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
class JwtStrategy extends PassportStrategy(Strategy) {
constructor() {
super({
jwtFromRequest: ,
ignoreExpiration: ,
secretOrKey:
});
}
async validate(payload: AccountJwtPayloadType) {
}
}