UNPKG

1.65 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 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;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8var JwtModule_1;
9Object.defineProperty(exports, "__esModule", { value: true });
10const common_1 = require("@nestjs/common");
11const jwt_service_1 = require("./jwt.service");
12const jwt_provider_1 = require("./jwt.provider");
13let JwtModule = JwtModule_1 = class JwtModule {
14 static forRoot(options) {
15 const optionsProvider = jwt_provider_1.createJwtOptionsProvider(options);
16 const providers = [jwt_service_1.JwtService, optionsProvider];
17 return {
18 module: JwtModule_1,
19 providers,
20 exports: providers,
21 };
22 }
23 static forRootAsync(options) {
24 const optionsProvider = jwt_provider_1.createJwtAsyncOptionsProvider(options);
25 const providers = [jwt_service_1.JwtService, optionsProvider];
26 return {
27 module: JwtModule_1,
28 providers,
29 exports: providers,
30 };
31 }
32};
33JwtModule = JwtModule_1 = __decorate([
34 common_1.Global(),
35 common_1.Module({})
36], JwtModule);
37exports.JwtModule = JwtModule;
38//# sourceMappingURL=jwt.module.js.map
\No newline at end of file