@loopstack/auth 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.module.d.ts +4 -4
- package/dist/auth.module.d.ts.map +1 -1
- package/dist/auth.module.js +35 -37
- package/dist/auth.module.js.map +1 -1
- package/dist/commands/assign-role.command.js +19 -22
- package/dist/commands/assign-role.command.js.map +1 -1
- package/dist/controllers/auth.controller.d.ts +5 -5
- package/dist/controllers/auth.controller.d.ts.map +1 -1
- package/dist/controllers/auth.controller.js +32 -47
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/index.d.ts +1 -1
- package/dist/controllers/index.d.ts.map +1 -1
- package/dist/controllers/index.js +1 -17
- package/dist/controllers/index.js.map +1 -1
- package/dist/dtos/auth-response.dto.js +1 -5
- package/dist/dtos/auth-response.dto.js.map +1 -1
- package/dist/dtos/hub-login-request.dto.d.ts.map +1 -1
- package/dist/dtos/hub-login-request.dto.js +3 -9
- package/dist/dtos/hub-login-request.dto.js.map +1 -1
- package/dist/dtos/hub-login-response.dto.d.ts.map +1 -1
- package/dist/dtos/hub-login-response.dto.js +4 -11
- package/dist/dtos/hub-login-response.dto.js.map +1 -1
- package/dist/dtos/user-response.dto.js +1 -5
- package/dist/dtos/user-response.dto.js.map +1 -1
- package/dist/dtos/worker-info.dto.d.ts.map +1 -1
- package/dist/dtos/worker-info.dto.js +5 -19
- package/dist/dtos/worker-info.dto.js.map +1 -1
- package/dist/guards/hub-auth.guard.js +6 -9
- package/dist/guards/hub-auth.guard.js.map +1 -1
- package/dist/guards/index.d.ts +2 -2
- package/dist/guards/index.d.ts.map +1 -1
- package/dist/guards/index.js +2 -18
- package/dist/guards/index.js.map +1 -1
- package/dist/guards/jwt-auth.guard.js +16 -19
- package/dist/guards/jwt-auth.guard.js.map +1 -1
- package/dist/guards/roles.guard.js +8 -11
- package/dist/guards/roles.guard.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -22
- package/dist/index.js.map +1 -1
- package/dist/interfaces/auth-config.interface.js +1 -2
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -17
- package/dist/interfaces/index.js.map +1 -1
- package/dist/repositories/index.d.ts +1 -1
- package/dist/repositories/index.d.ts.map +1 -1
- package/dist/repositories/index.js +1 -17
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/user.repository.js +11 -14
- package/dist/repositories/user.repository.js.map +1 -1
- package/dist/seeds/local-dev-user.seed.d.ts +1 -1
- package/dist/seeds/local-dev-user.seed.d.ts.map +1 -1
- package/dist/seeds/local-dev-user.seed.js +10 -13
- package/dist/seeds/local-dev-user.seed.js.map +1 -1
- package/dist/services/auth.service.d.ts +5 -5
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +19 -22
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/config-validation.service.js +6 -9
- package/dist/services/config-validation.service.js.map +1 -1
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -18
- package/dist/services/index.js.map +1 -1
- package/dist/services/token.service.js +8 -11
- package/dist/services/token.service.js.map +1 -1
- package/dist/strategies/hub.strategy.d.ts +1 -1
- package/dist/strategies/hub.strategy.d.ts.map +1 -1
- package/dist/strategies/hub.strategy.js +25 -28
- package/dist/strategies/hub.strategy.js.map +1 -1
- package/dist/strategies/index.d.ts +2 -2
- package/dist/strategies/index.d.ts.map +1 -1
- package/dist/strategies/index.js +2 -18
- package/dist/strategies/index.js.map +1 -1
- package/dist/strategies/jwt.strategy.js +11 -14
- package/dist/strategies/jwt.strategy.js.map +1 -1
- package/package.json +18 -28
package/dist/auth.module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
export declare class AuthModule {
|
|
3
|
-
|
|
4
|
-
static
|
|
1
|
+
import { DynamicModule, MiddlewareConsumer, NestModule } from '@nestjs/common';
|
|
2
|
+
export declare class AuthModule implements NestModule {
|
|
3
|
+
configure(consumer: MiddlewareConsumer): void;
|
|
4
|
+
static forRoot(connection?: string): DynamicModule;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=auth.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAU,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAgBvF,qBACa,UAAW,YAAW,UAAU;IAC3C,SAAS,CAAC,QAAQ,EAAE,kBAAkB;IAItC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa;CA+BnD"}
|
package/dist/auth.module.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -6,59 +5,58 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
7
|
var AuthModule_1;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const strategies_1 = require("./strategies");
|
|
8
|
+
import { Module } from '@nestjs/common';
|
|
9
|
+
import { ConfigService } from '@nestjs/config';
|
|
10
|
+
import { JwtModule } from '@nestjs/jwt';
|
|
11
|
+
import { PassportModule } from '@nestjs/passport';
|
|
12
|
+
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
13
|
+
import cookieParser from 'cookie-parser';
|
|
14
|
+
import { Role, User } from '@loopstack/common';
|
|
15
|
+
import { AssignRoleCommand } from './commands/assign-role.command.js';
|
|
16
|
+
import { AuthController } from './controllers/index.js';
|
|
17
|
+
import { JwtAuthGuard, RolesGuard } from './guards/index.js';
|
|
18
|
+
import { UserRepository } from './repositories/index.js';
|
|
19
|
+
import { ConfigValidationService } from './services/config-validation.service.js';
|
|
20
|
+
import { AuthService, TokenService } from './services/index.js';
|
|
21
|
+
import { HubStrategy, JwtStrategy } from './strategies/index.js';
|
|
24
22
|
let AuthModule = AuthModule_1 = class AuthModule {
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
configure(consumer) {
|
|
24
|
+
consumer.apply(cookieParser()).forRoutes('*');
|
|
27
25
|
}
|
|
28
|
-
static
|
|
26
|
+
static forRoot(connection) {
|
|
29
27
|
return {
|
|
30
28
|
module: AuthModule_1,
|
|
31
29
|
imports: [
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
PassportModule.register({ defaultStrategy: 'jwt' }),
|
|
31
|
+
JwtModule.registerAsync({
|
|
34
32
|
useFactory: (configService) => ({
|
|
35
33
|
secret: configService.get('auth.jwt.secret'),
|
|
36
34
|
signOptions: {
|
|
37
35
|
expiresIn: configService.get('auth.jwt.expiresIn') || '1h',
|
|
38
36
|
},
|
|
39
37
|
}),
|
|
40
|
-
inject: [
|
|
38
|
+
inject: [ConfigService],
|
|
41
39
|
}),
|
|
42
|
-
|
|
40
|
+
TypeOrmModule.forFeature([User, Role], connection),
|
|
43
41
|
],
|
|
44
|
-
controllers: [
|
|
42
|
+
controllers: [AuthController],
|
|
45
43
|
providers: [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
ConfigValidationService,
|
|
45
|
+
AuthService,
|
|
46
|
+
UserRepository,
|
|
47
|
+
TokenService,
|
|
48
|
+
JwtStrategy,
|
|
49
|
+
HubStrategy,
|
|
50
|
+
JwtAuthGuard,
|
|
51
|
+
RolesGuard,
|
|
52
|
+
AssignRoleCommand,
|
|
55
53
|
],
|
|
56
|
-
exports: [
|
|
54
|
+
exports: [AuthService, UserRepository, JwtAuthGuard, RolesGuard],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
(0, common_1.Module)({})
|
|
58
|
+
AuthModule = AuthModule_1 = __decorate([
|
|
59
|
+
Module({})
|
|
63
60
|
], AuthModule);
|
|
61
|
+
export { AuthModule };
|
|
64
62
|
//# sourceMappingURL=auth.module.js.map
|
package/dist/auth.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAqC,MAAM,EAAc,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,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,WAAW;gBACX,WAAW;gBACX,YAAY;gBACZ,UAAU;gBACV,iBAAiB;aAClB;YACD,OAAO,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC;SACjE,CAAC;IACJ,CAAC;CACF,CAAA;AApCY,UAAU;IADtB,MAAM,CAAC,EAAE,CAAC;GACE,UAAU,CAoCtB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -12,17 +11,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
13
|
var AssignRoleCommand_1;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const common_2 = require("@loopstack/common");
|
|
22
|
-
let AssignRoleCommand = AssignRoleCommand_1 = class AssignRoleCommand extends nest_commander_1.CommandRunner {
|
|
14
|
+
import { Logger } from '@nestjs/common';
|
|
15
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
16
|
+
import { Command, CommandRunner, Option } from 'nest-commander';
|
|
17
|
+
import { Repository } from 'typeorm';
|
|
18
|
+
import { Role, RoleName, User } from '@loopstack/common';
|
|
19
|
+
let AssignRoleCommand = AssignRoleCommand_1 = class AssignRoleCommand extends CommandRunner {
|
|
23
20
|
userRepository;
|
|
24
21
|
roleRepository;
|
|
25
|
-
logger = new
|
|
22
|
+
logger = new Logger(AssignRoleCommand_1.name);
|
|
26
23
|
constructor(userRepository, roleRepository) {
|
|
27
24
|
super();
|
|
28
25
|
this.userRepository = userRepository;
|
|
@@ -38,12 +35,12 @@ let AssignRoleCommand = AssignRoleCommand_1 = class AssignRoleCommand extends ne
|
|
|
38
35
|
const roleName = options.role;
|
|
39
36
|
if (!roleName) {
|
|
40
37
|
console.error('Please specify a role with --role');
|
|
41
|
-
console.log(`Available roles: ${Object.values(
|
|
38
|
+
console.log(`Available roles: ${Object.values(RoleName).join(', ')}`);
|
|
42
39
|
process.exit(1);
|
|
43
40
|
}
|
|
44
|
-
if (!Object.values(
|
|
41
|
+
if (!Object.values(RoleName).includes(roleName)) {
|
|
45
42
|
console.error(`Invalid role: ${roleName}`);
|
|
46
|
-
console.log(`Available roles: ${Object.values(
|
|
43
|
+
console.log(`Available roles: ${Object.values(RoleName).join(', ')}`);
|
|
47
44
|
process.exit(1);
|
|
48
45
|
}
|
|
49
46
|
try {
|
|
@@ -81,26 +78,26 @@ let AssignRoleCommand = AssignRoleCommand_1 = class AssignRoleCommand extends ne
|
|
|
81
78
|
return val;
|
|
82
79
|
}
|
|
83
80
|
};
|
|
84
|
-
exports.AssignRoleCommand = AssignRoleCommand;
|
|
85
81
|
__decorate([
|
|
86
|
-
|
|
82
|
+
Option({
|
|
87
83
|
flags: '-r, --role <role>',
|
|
88
|
-
description: `Role to assign (${Object.values(
|
|
84
|
+
description: `Role to assign (${Object.values(RoleName).join(', ')})`,
|
|
89
85
|
required: true,
|
|
90
86
|
}),
|
|
91
87
|
__metadata("design:type", Function),
|
|
92
88
|
__metadata("design:paramtypes", [String]),
|
|
93
89
|
__metadata("design:returntype", String)
|
|
94
90
|
], AssignRoleCommand.prototype, "parseRole", null);
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
AssignRoleCommand = AssignRoleCommand_1 = __decorate([
|
|
92
|
+
Command({
|
|
97
93
|
name: 'assign-role',
|
|
98
94
|
description: 'Assign a role to an existing user',
|
|
99
95
|
arguments: '<userId>',
|
|
100
96
|
}),
|
|
101
|
-
__param(0,
|
|
102
|
-
__param(1,
|
|
103
|
-
__metadata("design:paramtypes", [
|
|
104
|
-
|
|
97
|
+
__param(0, InjectRepository(User)),
|
|
98
|
+
__param(1, InjectRepository(Role)),
|
|
99
|
+
__metadata("design:paramtypes", [Repository,
|
|
100
|
+
Repository])
|
|
105
101
|
], AssignRoleCommand);
|
|
102
|
+
export { AssignRoleCommand };
|
|
106
103
|
//# sourceMappingURL=assign-role.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assign-role.command.js","sourceRoot":"","sources":["../../src/commands/assign-role.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assign-role.command.js","sourceRoot":"","sources":["../../src/commands/assign-role.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAWlD,IAAM,iBAAiB,yBAAvB,MAAM,iBAAkB,SAAQ,aAAa;IAK/B;IAEA;IANF,MAAM,GAAG,IAAI,MAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAE7D,YAEmB,cAAgC,EAEhC,cAAgC;QAEjD,KAAK,EAAE,CAAC;QAJS,mBAAc,GAAd,cAAc,CAAkB;QAEhC,mBAAc,GAAd,cAAc,CAAkB;IAGnD,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAgB,EAAE,OAAiC;QAC3D,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;QAExB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,oD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G;QACrE,QAAQ,EAAE,IAAI;KACf,CAAC;;;;kDAGD;AA9EU,iBAAiB;IAL7B,OAAO,CAAC;QACP,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mCAAmC;QAChD,SAAS,EAAE,UAAU;KACtB,CAAC;IAKG,WAAA,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAEtB,WAAA,gBAAgB,CAAC,IAAI,CAAC,CAAA;qCADU,UAAU;QAEV,UAAU;GAPlC,iBAAiB,CA+E7B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
2
|
import { CurrentUserInterface, User } from '@loopstack/common';
|
|
3
|
-
import { HubLoginRequestDto } from '../dtos/hub-login-request.dto';
|
|
4
|
-
import { HubLoginResponseDto } from '../dtos/hub-login-response.dto';
|
|
5
|
-
import { UserResponseDto } from '../dtos/user-response.dto';
|
|
6
|
-
import { WorkerInfoDto } from '../dtos/worker-info.dto';
|
|
7
|
-
import { AuthService, TokenService } from '../services';
|
|
3
|
+
import { HubLoginRequestDto } from '../dtos/hub-login-request.dto.js';
|
|
4
|
+
import { HubLoginResponseDto } from '../dtos/hub-login-response.dto.js';
|
|
5
|
+
import { UserResponseDto } from '../dtos/user-response.dto.js';
|
|
6
|
+
import { WorkerInfoDto } from '../dtos/worker-info.dto.js';
|
|
7
|
+
import { AuthService, TokenService } from '../services/index.js';
|
|
8
8
|
export declare class AuthController {
|
|
9
9
|
private readonly authService;
|
|
10
10
|
private readonly tokenService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAe,oBAAoB,EAAU,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjE,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY;IAG7C,OAAO,CAAC,UAAU;IAgBZ,OAAO,CAAQ,GAAG,EAAE,OAAO,EAA8B,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAa3G,MAAM,CAA6B,GAAG,EAAE,QAAQ,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;IAOhE,EAAE,CAAgB,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAM7E,OAAO,IAAI,aAAa;IAQlB,QAAQ,CACJ,mBAAmB,EAAE,kBAAkB,EACxC,GAAG,EAAE,OAAO,GAAG;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,EACR,GAAG,EAAE,QAAQ,GACxC,OAAO,CAAC,mBAAmB,CAAC;CAOhC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,17 +10,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const hub_login_request_dto_1 = require("../dtos/hub-login-request.dto");
|
|
21
|
-
const hub_login_response_dto_1 = require("../dtos/hub-login-response.dto");
|
|
22
|
-
const worker_info_dto_1 = require("../dtos/worker-info.dto");
|
|
23
|
-
const hub_auth_guard_1 = require("../guards/hub-auth.guard");
|
|
24
|
-
const services_1 = require("../services");
|
|
13
|
+
import { Body, Controller, Get, HttpCode, HttpStatus, Post, Req, Res, UseGuards } from '@nestjs/common';
|
|
14
|
+
import { CurrentUser, Public } from '@loopstack/common';
|
|
15
|
+
import { HubLoginRequestDto } from '../dtos/hub-login-request.dto.js';
|
|
16
|
+
import { WorkerInfoDto } from '../dtos/worker-info.dto.js';
|
|
17
|
+
import { HubAuthGuard } from '../guards/hub-auth.guard.js';
|
|
18
|
+
import { AuthService, TokenService } from '../services/index.js';
|
|
25
19
|
let AuthController = class AuthController {
|
|
26
20
|
authService;
|
|
27
21
|
tokenService;
|
|
@@ -57,63 +51,54 @@ let AuthController = class AuthController {
|
|
|
57
51
|
return { id: req.user.id, message: 'Login successful' };
|
|
58
52
|
}
|
|
59
53
|
};
|
|
60
|
-
exports.AuthController = AuthController;
|
|
61
54
|
__decorate([
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
__param(0,
|
|
66
|
-
__param(1,
|
|
55
|
+
Public(),
|
|
56
|
+
HttpCode(HttpStatus.OK),
|
|
57
|
+
Post('refresh'),
|
|
58
|
+
__param(0, Req()),
|
|
59
|
+
__param(1, Res({ passthrough: true })),
|
|
67
60
|
__metadata("design:type", Function),
|
|
68
61
|
__metadata("design:paramtypes", [Object, Object]),
|
|
69
62
|
__metadata("design:returntype", Promise)
|
|
70
63
|
], AuthController.prototype, "refresh", null);
|
|
71
64
|
__decorate([
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
__param(0,
|
|
65
|
+
HttpCode(HttpStatus.OK),
|
|
66
|
+
Post('logout'),
|
|
67
|
+
__param(0, Res({ passthrough: true })),
|
|
75
68
|
__metadata("design:type", Function),
|
|
76
69
|
__metadata("design:paramtypes", [Object]),
|
|
77
70
|
__metadata("design:returntype", Object)
|
|
78
71
|
], AuthController.prototype, "logout", null);
|
|
79
72
|
__decorate([
|
|
80
|
-
|
|
81
|
-
__param(0,
|
|
73
|
+
Get('me'),
|
|
74
|
+
__param(0, CurrentUser()),
|
|
82
75
|
__metadata("design:type", Function),
|
|
83
76
|
__metadata("design:paramtypes", [Object]),
|
|
84
77
|
__metadata("design:returntype", Promise)
|
|
85
78
|
], AuthController.prototype, "me", null);
|
|
86
79
|
__decorate([
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
(0, api_response_decorator_1.ApiResponse)({ type: worker_info_dto_1.WorkerInfoDto }),
|
|
90
|
-
(0, swagger_1.ApiExtraModels)(worker_info_dto_1.WorkerInfoDto),
|
|
80
|
+
Public(),
|
|
81
|
+
Get('worker/health'),
|
|
91
82
|
__metadata("design:type", Function),
|
|
92
83
|
__metadata("design:paramtypes", []),
|
|
93
|
-
__metadata("design:returntype",
|
|
84
|
+
__metadata("design:returntype", WorkerInfoDto)
|
|
94
85
|
], AuthController.prototype, "getInfo", null);
|
|
95
86
|
__decorate([
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(0,
|
|
101
|
-
(
|
|
102
|
-
(
|
|
103
|
-
(0, api_response_decorator_1.ApiResponse)({ type: hub_login_response_dto_1.HubLoginResponseDto }),
|
|
104
|
-
(0, swagger_1.ApiOkResponse)(),
|
|
105
|
-
(0, swagger_1.ApiUnauthorizedResponse)(),
|
|
106
|
-
__param(0, (0, common_1.Body)()),
|
|
107
|
-
__param(1, (0, common_1.Req)()),
|
|
108
|
-
__param(2, (0, common_1.Res)({ passthrough: true })),
|
|
87
|
+
Public(),
|
|
88
|
+
Post('oauth/hub'),
|
|
89
|
+
HttpCode(HttpStatus.OK),
|
|
90
|
+
UseGuards(HubAuthGuard),
|
|
91
|
+
__param(0, Body()),
|
|
92
|
+
__param(1, Req()),
|
|
93
|
+
__param(2, Res({ passthrough: true })),
|
|
109
94
|
__metadata("design:type", Function),
|
|
110
|
-
__metadata("design:paramtypes", [
|
|
95
|
+
__metadata("design:paramtypes", [HubLoginRequestDto, Object, Object]),
|
|
111
96
|
__metadata("design:returntype", Promise)
|
|
112
97
|
], AuthController.prototype, "hubLogin", null);
|
|
113
|
-
|
|
114
|
-
(
|
|
115
|
-
(
|
|
116
|
-
|
|
117
|
-
services_1.TokenService])
|
|
98
|
+
AuthController = __decorate([
|
|
99
|
+
Controller('api/v1/auth'),
|
|
100
|
+
__metadata("design:paramtypes", [AuthService,
|
|
101
|
+
TokenService])
|
|
118
102
|
], AuthController);
|
|
103
|
+
export { AuthController };
|
|
119
104
|
//# sourceMappingURL=auth.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAE,WAAW,EAAwB,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,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ACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,SAAS,CAAC,YAAY,CAAC;IAErB,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;;qCAFE,kBAAkB;;8CAShD;AAlEU,cAAc;IAD1B,UAAU,CAAC,aAAa,CAAC;qCAGQ,WAAW;QACV,YAAY;GAHlC,cAAc,CAmE1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './auth.controller';
|
|
1
|
+
export * from './auth.controller.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./auth.controller"), exports);
|
|
1
|
+
export * from './auth.controller.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthResponseDto = void 0;
|
|
4
|
-
class AuthResponseDto {
|
|
1
|
+
export class AuthResponseDto {
|
|
5
2
|
accessToken;
|
|
6
3
|
refreshToken;
|
|
7
4
|
expiresIn;
|
|
8
5
|
tokenType = 'Bearer';
|
|
9
6
|
}
|
|
10
|
-
exports.AuthResponseDto = AuthResponseDto;
|
|
11
7
|
//# sourceMappingURL=auth-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-response.dto.js","sourceRoot":"","sources":["../../src/dtos/auth-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth-response.dto.js","sourceRoot":"","sources":["../../src/dtos/auth-response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,SAAS,CAAU;IACnB,SAAS,GAAW,QAAQ,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub-login-request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/hub-login-request.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hub-login-request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/hub-login-request.dto.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,qBAAa,kBAAmB,YAAW,wBAAwB;IAEjE,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,17 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
class HubLoginRequestDto {
|
|
10
|
+
import { Expose } from 'class-transformer';
|
|
11
|
+
export class HubLoginRequestDto {
|
|
16
12
|
idToken;
|
|
17
13
|
}
|
|
18
|
-
exports.HubLoginRequestDto = HubLoginRequestDto;
|
|
19
14
|
__decorate([
|
|
20
|
-
|
|
21
|
-
(0, swagger_1.ApiProperty)({ description: 'Hub-signed ID token' }),
|
|
15
|
+
Expose(),
|
|
22
16
|
__metadata("design:type", String)
|
|
23
17
|
], HubLoginRequestDto.prototype, "idToken", void 0);
|
|
24
18
|
//# sourceMappingURL=hub-login-request.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub-login-request.dto.js","sourceRoot":"","sources":["../../src/dtos/hub-login-request.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hub-login-request.dto.js","sourceRoot":"","sources":["../../src/dtos/hub-login-request.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,MAAM,OAAO,kBAAkB;IAE7B,OAAO,CAAS;CACjB;AADC;IADC,MAAM,EAAE;;mDACO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub-login-response.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/hub-login-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hub-login-response.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/hub-login-response.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE9B,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,23 +7,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
class HubLoginResponseDto {
|
|
10
|
+
import { Expose } from 'class-transformer';
|
|
11
|
+
export class HubLoginResponseDto {
|
|
16
12
|
id;
|
|
17
13
|
message;
|
|
18
14
|
}
|
|
19
|
-
exports.HubLoginResponseDto = HubLoginResponseDto;
|
|
20
15
|
__decorate([
|
|
21
|
-
|
|
22
|
-
(0, swagger_1.ApiProperty)({ description: 'The logged in user id' }),
|
|
16
|
+
Expose(),
|
|
23
17
|
__metadata("design:type", String)
|
|
24
18
|
], HubLoginResponseDto.prototype, "id", void 0);
|
|
25
19
|
__decorate([
|
|
26
|
-
|
|
27
|
-
(0, swagger_1.ApiProperty)({ description: 'A message' }),
|
|
20
|
+
Expose(),
|
|
28
21
|
__metadata("design:type", String)
|
|
29
22
|
], HubLoginResponseDto.prototype, "message", void 0);
|
|
30
23
|
//# sourceMappingURL=hub-login-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub-login-response.dto.js","sourceRoot":"","sources":["../../src/dtos/hub-login-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hub-login-response.dto.js","sourceRoot":"","sources":["../../src/dtos/hub-login-response.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,OAAO,mBAAmB;IAE9B,EAAE,CAAS;IAGX,OAAO,CAAS;CACjB;AAJC;IADC,MAAM,EAAE;;+CACE;AAGX;IADC,MAAM,EAAE;;oDACO"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserResponseDto = void 0;
|
|
4
|
-
class UserResponseDto {
|
|
1
|
+
export class UserResponseDto {
|
|
5
2
|
id;
|
|
6
3
|
isActive;
|
|
7
4
|
roles;
|
|
8
5
|
createdAt;
|
|
9
6
|
updatedAt;
|
|
10
7
|
}
|
|
11
|
-
exports.UserResponseDto = UserResponseDto;
|
|
12
8
|
//# sourceMappingURL=user-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-response.dto.js","sourceRoot":"","sources":["../../src/dtos/user-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-response.dto.js","sourceRoot":"","sources":["../../src/dtos/user-response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,EAAE,CAAU;IACZ,QAAQ,CAAW;IACnB,KAAK,CAAY;IACjB,SAAS,CAAQ;IACjB,SAAS,CAAQ;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-info.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/worker-info.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-info.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/worker-info.dto.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,qBAAa,aAAc,YAAW,mBAAmB;IAEvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,YAAY,EAAE,OAAO,CAAC;IAGtB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,35 +7,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
class WorkerInfoDto {
|
|
10
|
+
import { Expose } from 'class-transformer';
|
|
11
|
+
export class WorkerInfoDto {
|
|
16
12
|
clientId;
|
|
17
13
|
isConfigured;
|
|
18
14
|
timestamp;
|
|
19
15
|
}
|
|
20
|
-
exports.WorkerInfoDto = WorkerInfoDto;
|
|
21
16
|
__decorate([
|
|
22
|
-
|
|
23
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
24
|
-
description: 'Worker Client ID',
|
|
25
|
-
}),
|
|
17
|
+
Expose(),
|
|
26
18
|
__metadata("design:type", String)
|
|
27
19
|
], WorkerInfoDto.prototype, "clientId", void 0);
|
|
28
20
|
__decorate([
|
|
29
|
-
|
|
30
|
-
(0, swagger_1.ApiProperty)({
|
|
31
|
-
description: 'Is worker configured.',
|
|
32
|
-
}),
|
|
21
|
+
Expose(),
|
|
33
22
|
__metadata("design:type", Boolean)
|
|
34
23
|
], WorkerInfoDto.prototype, "isConfigured", void 0);
|
|
35
24
|
__decorate([
|
|
36
|
-
|
|
37
|
-
(0, swagger_1.ApiProperty)({
|
|
38
|
-
description: 'Current Timestamp.',
|
|
39
|
-
}),
|
|
25
|
+
Expose(),
|
|
40
26
|
__metadata("design:type", String)
|
|
41
27
|
], WorkerInfoDto.prototype, "timestamp", void 0);
|
|
42
28
|
//# sourceMappingURL=worker-info.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-info.dto.js","sourceRoot":"","sources":["../../src/dtos/worker-info.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-info.dto.js","sourceRoot":"","sources":["../../src/dtos/worker-info.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,MAAM,OAAO,aAAa;IAExB,QAAQ,CAAU;IAGlB,YAAY,CAAU;IAGtB,SAAS,CAAS;CACnB;AAPC;IADC,MAAM,EAAE;;+CACS;AAGlB;IADC,MAAM,EAAE;;mDACa;AAGtB;IADC,MAAM,EAAE;;gDACS"}
|