mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-17 08:46:38 +08:00
1 line
5.5 KiB
JavaScript
1 line
5.5 KiB
JavaScript
'use strict';const _0x2a7043=_0x7e69;(function(_0x18eb2d,_0x4a1dee){const _0x429a79=_0x7e69,_0x317ff5=_0x18eb2d();while(!![]){try{const _0x458e36=-parseInt(_0x429a79(0x1ca))/0x1*(parseInt(_0x429a79(0x1e1))/0x2)+parseInt(_0x429a79(0x1bf))/0x3+-parseInt(_0x429a79(0x1bd))/0x4+parseInt(_0x429a79(0x1ea))/0x5*(-parseInt(_0x429a79(0x1c0))/0x6)+-parseInt(_0x429a79(0x1ee))/0x7*(parseInt(_0x429a79(0x1cd))/0x8)+-parseInt(_0x429a79(0x1d8))/0x9+parseInt(_0x429a79(0x1db))/0xa*(parseInt(_0x429a79(0x1c2))/0xb);if(_0x458e36===_0x4a1dee)break;else _0x317ff5['push'](_0x317ff5['shift']());}catch(_0x492dec){_0x317ff5['push'](_0x317ff5['shift']());}}}(_0x492a,0x93a49));function _0x7e69(_0x5f097f,_0x6b17e1){const _0x492a12=_0x492a();return _0x7e69=function(_0x7e6964,_0x561692){_0x7e6964=_0x7e6964-0x1b6;let _0x471493=_0x492a12[_0x7e6964];return _0x471493;},_0x7e69(_0x5f097f,_0x6b17e1);}var __decorate=this&&this[_0x2a7043(0x1e7)]||function(_0x2b73a6,_0x3c10e4,_0xa8279,_0x22cc91){const _0x3f27df=_0x2a7043;var _0x4844ba=arguments[_0x3f27df(0x1cf)],_0x31f0ee=_0x4844ba<0x3?_0x3c10e4:_0x22cc91===null?_0x22cc91=Object[_0x3f27df(0x1de)](_0x3c10e4,_0xa8279):_0x22cc91,_0x15ba58;if(typeof Reflect===_0x3f27df(0x1c5)&&typeof Reflect[_0x3f27df(0x1dc)]===_0x3f27df(0x1eb))_0x31f0ee=Reflect[_0x3f27df(0x1dc)](_0x2b73a6,_0x3c10e4,_0xa8279,_0x22cc91);else{for(var _0x149982=_0x2b73a6[_0x3f27df(0x1cf)]-0x1;_0x149982>=0x0;_0x149982--)if(_0x15ba58=_0x2b73a6[_0x149982])_0x31f0ee=(_0x4844ba<0x3?_0x15ba58(_0x31f0ee):_0x4844ba>0x3?_0x15ba58(_0x3c10e4,_0xa8279,_0x31f0ee):_0x15ba58(_0x3c10e4,_0xa8279))||_0x31f0ee;}return _0x4844ba>0x3&&_0x31f0ee&&Object[_0x3f27df(0x1d1)](_0x3c10e4,_0xa8279,_0x31f0ee),_0x31f0ee;},__metadata=this&&this['__metadata']||function(_0xe1e28a,_0x1e4e7c){const _0xf39f13=_0x2a7043;if(typeof Reflect===_0xf39f13(0x1c5)&&typeof Reflect[_0xf39f13(0x1c9)]===_0xf39f13(0x1eb))return Reflect[_0xf39f13(0x1c9)](_0xe1e28a,_0x1e4e7c);};function _0x492a(){const _0x276b48=['1uMbFiu','validateToken','JWT_SECRET','2000ycvqcV','redisCacheService','length','canActivate','defineProperty','UNAUTHORIZED','moduleRef','JwtAuthGuard','verify','GlobalConfigService','HttpStatus','7258023wyHFBm','../../modules/redisCache/redisCache.service','Bearer','3340MwqzON','decorate','HttpException','getOwnPropertyDescriptor','@nestjs/common','../../modules/globalConfig/globalConfig.service','704136iiQssf','getRequest','env','get','AuthGuard','UnauthorizedException','__decorate','../../modules/auth/auth.service','user','10tDtNoW','function','split','ModuleRef','7504zMxMMK','亲爱的用户,请登录后继续操作,我们正在等您的到来!','handleRequest','err:\x20','jsonwebtoken','toString','x-website-domain','AuthService','createTokenFromFingerprint','extractToken','RedisCacheService','3884576RMusdF','fingerprint','2829660JFdwTa','1332438DbkBAr','getNineAiToken','82445KnGNDZ','@nestjs/passport','headers','object','authorization','authService','globalConfigService','metadata'];_0x492a=function(){return _0x276b48;};return _0x492a();}Object[_0x2a7043(0x1d1)](exports,'__esModule',{'value':!![]}),exports[_0x2a7043(0x1d4)]=void 0x0;const redisCache_service_1=require(_0x2a7043(0x1d9)),common_1=require(_0x2a7043(0x1df)),passport_1=require(_0x2a7043(0x1c3)),jwt=require(_0x2a7043(0x1b6)),core_1=require('@nestjs/core'),globalConfig_service_1=require(_0x2a7043(0x1e0)),auth_service_1=require(_0x2a7043(0x1e8));let JwtAuthGuard=class JwtAuthGuard extends(0x0,passport_1[_0x2a7043(0x1e5)])('jwt'){constructor(_0x2ba75a,_0x4e39cf,_0x126080,_0x440ddf){const _0x3935e3=_0x2a7043;super(),this[_0x3935e3(0x1ce)]=_0x2ba75a,this['moduleRef']=_0x4e39cf,this[_0x3935e3(0x1c8)]=_0x126080,this[_0x3935e3(0x1c7)]=_0x440ddf;}async[_0x2a7043(0x1d0)](_0x4fd3ae){const _0x2f5c59=_0x2a7043;!this[_0x2f5c59(0x1ce)]&&(this[_0x2f5c59(0x1ce)]=this[_0x2f5c59(0x1d3)][_0x2f5c59(0x1e4)](redisCache_service_1[_0x2f5c59(0x1bc)],{'strict':![]}));const _0x3da716=_0x4fd3ae['switchToHttp']()[_0x2f5c59(0x1e2)](),_0x27c7a2=_0x3da716[_0x2f5c59(0x1c4)][_0x2f5c59(0x1b8)],_0x4e2098=this[_0x2f5c59(0x1bb)](_0x3da716);_0x3da716[_0x2f5c59(0x1e9)]=this[_0x2f5c59(0x1cb)](_0x4e2098);const _0x54cbc5=this['globalConfigService'][_0x2f5c59(0x1c1)]();return await this[_0x2f5c59(0x1ce)]['checkTokenAuth'](_0x4e2098,_0x3da716),!![];}[_0x2a7043(0x1bb)](_0x4b6e1e){const _0x3c2207=_0x2a7043;if(!_0x4b6e1e[_0x3c2207(0x1c4)][_0x3c2207(0x1c6)]){if(_0x4b6e1e[_0x3c2207(0x1c4)][_0x3c2207(0x1be)]){let _0xf67a45=_0x4b6e1e[_0x3c2207(0x1c4)][_0x3c2207(0x1be)];_0xf67a45>0x7fffffff&&(_0xf67a45=_0xf67a45[_0x3c2207(0x1b7)]()['slice'](-0x9),_0xf67a45=Number(String(Number(_0xf67a45))));const _0x551f10=this[_0x3c2207(0x1c7)][_0x3c2207(0x1ba)](_0xf67a45);return _0x551f10;}return null;}const _0x247660=_0x4b6e1e[_0x3c2207(0x1c4)][_0x3c2207(0x1c6)][_0x3c2207(0x1ec)]('\x20');if(_0x247660[_0x3c2207(0x1cf)]!==0x2||_0x247660[0x0]!==_0x3c2207(0x1da))return null;return _0x247660[0x1];}[_0x2a7043(0x1cb)](_0x549999){const _0x2ef378=_0x2a7043;try{return jwt[_0x2ef378(0x1d5)](_0x549999,process[_0x2ef378(0x1e3)][_0x2ef378(0x1cc)]);}catch(_0x4c98a5){throw new common_1[(_0x2ef378(0x1dd))](_0x2ef378(0x1ef),common_1[_0x2ef378(0x1d7)][_0x2ef378(0x1d2)]);}}[_0x2a7043(0x1f0)](_0x4f2562,_0xb3e59f,_0x517df){const _0xacb84c=_0x2a7043;if(_0x4f2562||!_0xb3e59f){console['log'](_0xacb84c(0x1f1),_0x4f2562);throw _0x4f2562||new common_1[(_0xacb84c(0x1e6))]();}return _0xb3e59f;}};JwtAuthGuard=__decorate([(0x0,common_1['Injectable'])(),__metadata('design:paramtypes',[redisCache_service_1['RedisCacheService'],core_1[_0x2a7043(0x1ed)],globalConfig_service_1[_0x2a7043(0x1d6)],auth_service_1[_0x2a7043(0x1b9)]])],JwtAuthGuard),exports['JwtAuthGuard']=JwtAuthGuard; |