Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
user_service_1.UserService,
];
let ServiceModule = class ServiceModule {
async onModuleInit() {
}
};
ServiceModule = __decorate([
common_1.Module({
imports: [
event_bus_module_1.EventBusModule,
typeorm_1.TypeOrmModule.forRoot(config_helpers_1.getConfig().dbConnectionOptions),
cache_module_1.CacheModule,
passport_1.PassportModule.register({
defaultStrategy: 'jwt',
}),
jwt_1.JwtModule.register({
secretOrPrivateKey: APP_CONFIG.AUTH.jwtTokenSecret,
signOptions: { expiresIn: APP_CONFIG.AUTH.expiresIn },
}),
],
providers: [
...exportedProviders,
password_ciper_1.PasswordCiper,
],
exports: exportedProviders,
})
], ServiceModule);
exports.ServiceModule = ServiceModule;
//# sourceMappingURL=service.module.js.map
categories_controller_1.CategoriesController,
comment_controller_1.CommentController,
option_controller_1.OptionController,
post_controller_1.PostController,
user_controller_1.UserController,
wechat_controller_1.WechatController,
];
let RestApiModule = class RestApiModule {
};
RestApiModule = __decorate([
common_1.Module({
imports: [
passport_1.PassportModule.register({
defaultStrategy: 'jwt',
}),
jwt_1.JwtModule.register({
secretOrPrivateKey: APP_CONFIG.AUTH.jwtTokenSecret,
signOptions: { expiresIn: APP_CONFIG.AUTH.expiresIn },
}),
],
controllers: [...controllers],
providers: [service_module_1.ServiceModule],
})
], RestApiModule);
exports.RestApiModule = RestApiModule;
//# sourceMappingURL=api-internal-modules.js.map
Object.defineProperty(exports, "__esModule", { value: true });
const common_1 = require("@nestjs/common");
const jwt_1 = require("@nestjs/jwt");
const passport_1 = require("@nestjs/passport");
const auth_controller_1 = require("./auth.controller");
const auth_service_1 = require("./auth.service");
const jwt_strategy_1 = require("./jwt.strategy");
const config_module_1 = require("./../config/config.module");
const config_service_1 = require("./../config/config.service");
let AuthModule = class AuthModule {
};
AuthModule = __decorate([
common_1.Module({
imports: [
passport_1.PassportModule.register({ defaultStrategy: 'jwt' }),
jwt_1.JwtModule.registerAsync({
imports: [
config_module_1.ConfigModule,
],
useFactory: (configService) => __awaiter(this, void 0, void 0, function* () {
return {
secretOrPrivateKey: configService.get('JWT_SECRET_KEY'),
signOptions: {
algorithm: configService.get('JWT_ALGORITHM'),
expiresIn: configService.get('JWT_EXPIRE_IN'),
},
};
}),
inject: [
config_service_1.ConfigService,
],
}),