@loopstack/auth 0.29.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
|
@@ -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,10 +7,8 @@ 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 common_1 = require("@nestjs/common");
|
|
14
|
-
const config_1 = require("@nestjs/config");
|
|
10
|
+
import { Injectable } from '@nestjs/common';
|
|
11
|
+
import { ConfigService } from '@nestjs/config';
|
|
15
12
|
let ConfigValidationService = class ConfigValidationService {
|
|
16
13
|
configService;
|
|
17
14
|
constructor(configService) {
|
|
@@ -36,9 +33,9 @@ let ConfigValidationService = class ConfigValidationService {
|
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
36
|
+
ConfigValidationService = __decorate([
|
|
37
|
+
Injectable(),
|
|
38
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
43
39
|
], ConfigValidationService);
|
|
40
|
+
export { ConfigValidationService };
|
|
44
41
|
//# sourceMappingURL=config-validation.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-validation.service.js","sourceRoot":"","sources":["../../src/services/config-validation.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-validation.service.js","sourceRoot":"","sources":["../../src/services/config-validation.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACd;IAApB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,YAAY;QACV,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAEO,kBAAkB;QACxB,MAAM,eAAe,GAAG;YAGtB,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE;SAC/C,CAAC;QAEF,MAAM,cAAc,GAAa,EAAE,CAAC;QAEpC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,GAAG,CAAC,CAAC;YAClD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,0CAA0C,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;CACF,CAAA;AA3BY,uBAAuB;IADnC,UAAU,EAAE;qCAEwB,aAAa;GADrC,uBAAuB,CA2BnC"}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './auth.service';
|
|
2
|
-
export * from './token.service';
|
|
1
|
+
export * from './auth.service.js';
|
|
2
|
+
export * from './token.service.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
package/dist/services/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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.service"), exports);
|
|
18
|
-
__exportStar(require("./token.service"), exports);
|
|
1
|
+
export * from './auth.service.js';
|
|
2
|
+
export * from './token.service.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
@@ -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,11 +7,9 @@ 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
|
-
|
|
14
|
-
const config_1 = require("@nestjs/config");
|
|
15
|
-
const jwt_1 = require("@nestjs/jwt");
|
|
10
|
+
import { Injectable } from '@nestjs/common';
|
|
11
|
+
import { ConfigService } from '@nestjs/config';
|
|
12
|
+
import { JwtService } from '@nestjs/jwt';
|
|
16
13
|
let TokenService = class TokenService {
|
|
17
14
|
configService;
|
|
18
15
|
jwtService;
|
|
@@ -86,10 +83,10 @@ let TokenService = class TokenService {
|
|
|
86
83
|
});
|
|
87
84
|
}
|
|
88
85
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
(
|
|
92
|
-
|
|
93
|
-
jwt_1.JwtService])
|
|
86
|
+
TokenService = __decorate([
|
|
87
|
+
Injectable(),
|
|
88
|
+
__metadata("design:paramtypes", [ConfigService,
|
|
89
|
+
JwtService])
|
|
94
90
|
], TokenService);
|
|
91
|
+
export { TokenService };
|
|
95
92
|
//# sourceMappingURL=token.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.service.js","sourceRoot":"","sources":["../../src/services/token.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token.service.js","sourceRoot":"","sources":["../../src/services/token.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIlC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEJ;IACT;IAFV,YACmB,aAA4B,EACrC,UAAsB;QADb,kB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C,GAAG,CAAC;YACpD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC;YAClC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE;gBACjC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE;gBAC/B,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE;aACtC,CAAC;SACH,CAAC,CAAC;QAEH,OAAO;YACL,WAAW;YACX,YAAY;YACZ,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE;SAC/B,CAAC;IACJ,CAAC;IAEO,mBAAmB,CAAC,SAAiB;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/C,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,GAAG;gBACN,OAAO,KAAK,GAAG,IAAI,CAAC;YACtB,KAAK,GAAG;gBACN,OAAO,KAAK,GAAG,KAAK,CAAC;YACvB,KAAK,GAAG;gBACN,OAAO,KAAK,GAAG,EAAE,CAAC;YACpB,KAAK,GAAG;gBACN,OAAO,KAAK,CAAC;YACf;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IAED,kBAAkB,CAAC,YAAoB;QACrC,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAsB,YAAY,EAAE;YAC/D,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE;SAChC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAnFY,YAAY;IADxB,UAAU,EAAE;qCAGuB,aAAa;QACzB,UAAU;GAHrB,YAAY,CAmFxB"}
|
|
@@ -2,7 +2,7 @@ import { ConfigService } from '@nestjs/config';
|
|
|
2
2
|
import { Request } from 'express';
|
|
3
3
|
import { Strategy } from 'passport-custom';
|
|
4
4
|
import { User } from '@loopstack/common';
|
|
5
|
-
import { UserRepository } from '../repositories';
|
|
5
|
+
import { UserRepository } from '../repositories/index.js';
|
|
6
6
|
declare const HubStrategy_base: new () => Strategy & {
|
|
7
7
|
validate(...args: any[]): unknown;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub.strategy.d.ts","sourceRoot":"","sources":["../../src/strategies/hub.strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"hub.strategy.d.ts","sourceRoot":"","sources":["../../src/strategies/hub.strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;;;;AAE1D,qBACa,WAAY,SAAQ,gBAAiC;IAK9D,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,cAAc;IALjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IACvD,OAAO,CAAC,IAAI,CAAgC;gBAGzB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc;IAKjD,OAAO,CAAC,OAAO;YAWD,iBAAiB;YAkBjB,iBAAiB;IAoCzB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB5C"}
|
|
@@ -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);
|
|
@@ -9,19 +8,17 @@ 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
10
|
var HubStrategy_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const repositories_1 = require("../repositories");
|
|
21
|
-
let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.PassportStrategy)(passport_custom_1.Strategy, 'hub') {
|
|
11
|
+
import { Injectable, Logger, UnauthorizedException } from '@nestjs/common';
|
|
12
|
+
import { ConfigService } from '@nestjs/config';
|
|
13
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
14
|
+
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
|
15
|
+
import { Strategy } from 'passport-custom';
|
|
16
|
+
import { UserTypeEnum } from '@loopstack/common';
|
|
17
|
+
import { UserRepository } from '../repositories/index.js';
|
|
18
|
+
let HubStrategy = HubStrategy_1 = class HubStrategy extends PassportStrategy(Strategy, 'hub') {
|
|
22
19
|
configService;
|
|
23
20
|
userRepository;
|
|
24
|
-
logger = new
|
|
21
|
+
logger = new Logger(HubStrategy_1.name);
|
|
25
22
|
jwks = null;
|
|
26
23
|
constructor(configService, userRepository) {
|
|
27
24
|
super();
|
|
@@ -32,9 +29,9 @@ let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.Passp
|
|
|
32
29
|
if (!this.jwks) {
|
|
33
30
|
const jwksUri = this.configService.get('auth.hub.jwksUri');
|
|
34
31
|
if (!jwksUri) {
|
|
35
|
-
throw new
|
|
32
|
+
throw new UnauthorizedException('Hub JWKS URI not configured');
|
|
36
33
|
}
|
|
37
|
-
this.jwks =
|
|
34
|
+
this.jwks = createRemoteJWKSet(new URL(jwksUri));
|
|
38
35
|
}
|
|
39
36
|
return this.jwks;
|
|
40
37
|
}
|
|
@@ -45,7 +42,7 @@ let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.Passp
|
|
|
45
42
|
}
|
|
46
43
|
const user = await this.userRepository.create({
|
|
47
44
|
id: crypto.randomUUID(),
|
|
48
|
-
type:
|
|
45
|
+
type: UserTypeEnum.Local,
|
|
49
46
|
isActive: true,
|
|
50
47
|
roles: [],
|
|
51
48
|
});
|
|
@@ -55,16 +52,16 @@ let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.Passp
|
|
|
55
52
|
async validateCloudUser(req) {
|
|
56
53
|
const { idToken } = req.body;
|
|
57
54
|
if (!idToken) {
|
|
58
|
-
throw new
|
|
55
|
+
throw new UnauthorizedException('Missing ID token');
|
|
59
56
|
}
|
|
60
57
|
const issuer = this.configService.get('auth.hub.issuer');
|
|
61
58
|
const clientId = this.configService.get('auth.clientId');
|
|
62
|
-
const { payload } = await
|
|
59
|
+
const { payload } = await jwtVerify(idToken, this.getJwks(), {
|
|
63
60
|
issuer,
|
|
64
61
|
audience: clientId,
|
|
65
62
|
});
|
|
66
63
|
if (!payload.sub) {
|
|
67
|
-
throw new
|
|
64
|
+
throw new UnauthorizedException('ID token missing sub claim');
|
|
68
65
|
}
|
|
69
66
|
const existingUser = await this.userRepository.findById(payload.sub);
|
|
70
67
|
if (existingUser) {
|
|
@@ -72,7 +69,7 @@ let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.Passp
|
|
|
72
69
|
}
|
|
73
70
|
const user = await this.userRepository.create({
|
|
74
71
|
id: payload.sub,
|
|
75
|
-
type:
|
|
72
|
+
type: UserTypeEnum.Cloud,
|
|
76
73
|
isActive: true,
|
|
77
74
|
roles: [],
|
|
78
75
|
});
|
|
@@ -81,25 +78,25 @@ let HubStrategy = HubStrategy_1 = class HubStrategy extends (0, passport_1.Passp
|
|
|
81
78
|
}
|
|
82
79
|
async validate(req) {
|
|
83
80
|
try {
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
81
|
+
const enableAuth = this.configService.get('app.enableAuth');
|
|
82
|
+
if (!enableAuth) {
|
|
86
83
|
return this.validateLocalUser();
|
|
87
84
|
}
|
|
88
85
|
return await this.validateCloudUser(req);
|
|
89
86
|
}
|
|
90
87
|
catch (error) {
|
|
91
|
-
if (error instanceof
|
|
88
|
+
if (error instanceof UnauthorizedException) {
|
|
92
89
|
throw error;
|
|
93
90
|
}
|
|
94
91
|
this.logger.error(`Authentication failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
95
|
-
throw new
|
|
92
|
+
throw new UnauthorizedException('Authentication failed.');
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
repositories_1.UserRepository])
|
|
96
|
+
HubStrategy = HubStrategy_1 = __decorate([
|
|
97
|
+
Injectable(),
|
|
98
|
+
__metadata("design:paramtypes", [ConfigService,
|
|
99
|
+
UserRepository])
|
|
104
100
|
], HubStrategy);
|
|
101
|
+
export { HubStrategy };
|
|
105
102
|
//# sourceMappingURL=hub.strategy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub.strategy.js","sourceRoot":"","sources":["../../src/strategies/hub.strategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hub.strategy.js","sourceRoot":"","sources":["../../src/strategies/hub.strategy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAA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,EAAE,IAAI;YACd,KAAK,EAAE,EAAE;SACV,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mDAAmD,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAE9E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,GAAY;QACzB,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAU,gBAAgB,CAAC,CAAC;YACrE,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAClC,CAAC;YAED,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;gBAC3C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;YACxG,MAAM,IAAI,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF,CAAA;AA5FY,WAAW;IADvB,UAAU,EAAE;qCAMuB,aAAa;QACZ,cAAc;GANtC,WAAW,CA4FvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './jwt.strategy';
|
|
2
|
-
export * from './hub.strategy';
|
|
1
|
+
export * from './jwt.strategy.js';
|
|
2
|
+
export * from './hub.strategy.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
package/dist/strategies/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./jwt.strategy"), exports);
|
|
18
|
-
__exportStar(require("./hub.strategy"), exports);
|
|
1
|
+
export * from './jwt.strategy.js';
|
|
2
|
+
export * from './hub.strategy.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
@@ -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);
|
|
@@ -9,20 +8,18 @@ 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
10
|
var JwtStrategy_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const passport_jwt_1 = require("passport-jwt");
|
|
18
|
-
let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
11
|
+
import { Injectable } from '@nestjs/common';
|
|
12
|
+
import { ConfigService } from '@nestjs/config';
|
|
13
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
14
|
+
import { ExtractJwt, Strategy } from 'passport-jwt';
|
|
15
|
+
let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends PassportStrategy(Strategy) {
|
|
19
16
|
constructor(configService) {
|
|
20
17
|
const config = configService.getOrThrow('auth');
|
|
21
18
|
const cookieName = `${config.clientId}-access`;
|
|
22
19
|
super({
|
|
23
|
-
jwtFromRequest:
|
|
20
|
+
jwtFromRequest: ExtractJwt.fromExtractors([
|
|
24
21
|
JwtStrategy_1.extractJWTFromCookie(cookieName),
|
|
25
|
-
|
|
22
|
+
ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
26
23
|
]),
|
|
27
24
|
ignoreExpiration: false,
|
|
28
25
|
secretOrKey: config.jwt?.secret ?? '',
|
|
@@ -46,9 +43,9 @@ let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.Passp
|
|
|
46
43
|
};
|
|
47
44
|
}
|
|
48
45
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
(
|
|
52
|
-
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
46
|
+
JwtStrategy = JwtStrategy_1 = __decorate([
|
|
47
|
+
Injectable(),
|
|
48
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
53
49
|
], JwtStrategy);
|
|
50
|
+
export { JwtStrategy };
|
|
54
51
|
//# sourceMappingURL=jwt.strategy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../src/strategies/jwt.strategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../src/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAK7C,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IACzD,YAAY,aAA4B;QACtC,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAa,MAAM,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,QAAQ,SAAS,CAAC;QAC/C,KAAK,CAAC;YACJ,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;gBACxC,aAAW,CAAC,oBAAoB,CAAC,UAAU,CAAC;gBAC5C,UAAU,CAAC,2BAA2B,EAAE;aACzC,CAAC;YACF,gBAAgB,EAAE,KAAK;YACvB,WAAW,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,UAAkB;QACpD,OAAO,CAAC,GAAY,EAAiB,EAAE;YACrC,MAAM,OAAO,GAAG,GAAG,CAAC,OAA6C,CAAC;YAClE,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;gBACnC,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;YAC7B,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,OAA4B;QACnC,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,GAAG;YACnB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC;IACJ,CAAC;CACF,CAAA;AAhCY,WAAW;IADvB,UAAU,EAAE;qCAEgB,aAAa;GAD7B,WAAW,CAgCvB"}
|
package/package.json
CHANGED
|
@@ -2,20 +2,27 @@
|
|
|
2
2
|
"name": "@loopstack/auth",
|
|
3
3
|
"displayName": "Loopstack Auth Module",
|
|
4
4
|
"description": "The auth module of the loopstack automation framework",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.30.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Jakob Klippel",
|
|
9
9
|
"url": "https://www.linkedin.com/in/jakob-klippel/"
|
|
10
10
|
},
|
|
11
|
+
"type": "module",
|
|
11
12
|
"main": "dist/index.js",
|
|
12
13
|
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
13
20
|
"scripts": {
|
|
14
21
|
"build": "nest build",
|
|
15
22
|
"compile": "tsc --noEmit",
|
|
16
23
|
"format": "prettier --write .",
|
|
17
24
|
"lint": "eslint .",
|
|
18
|
-
"test": "
|
|
25
|
+
"test": "vitest run",
|
|
19
26
|
"test:cov": "jest --coverage",
|
|
20
27
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
21
28
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
@@ -23,9 +30,9 @@
|
|
|
23
30
|
"watch": "nest build --watch"
|
|
24
31
|
},
|
|
25
32
|
"dependencies": {
|
|
26
|
-
"@loopstack/common": "^0.
|
|
27
|
-
"@loopstack/contracts": "^0.
|
|
28
|
-
"@loopstack/core": "^0.
|
|
33
|
+
"@loopstack/common": "^0.30.0",
|
|
34
|
+
"@loopstack/contracts": "^0.30.0",
|
|
35
|
+
"@loopstack/core": "^0.30.0",
|
|
29
36
|
"@nestjs/common": "^11.1.19",
|
|
30
37
|
"@nestjs/config": "^4.0.4",
|
|
31
38
|
"@nestjs/core": "^11.1.19",
|
|
@@ -34,7 +41,6 @@
|
|
|
34
41
|
"@nestjs/microservices": "^11.1.19",
|
|
35
42
|
"@nestjs/passport": "^11.0.5",
|
|
36
43
|
"@nestjs/platform-express": "^11.1.19",
|
|
37
|
-
"@nestjs/swagger": "^11.2.7",
|
|
38
44
|
"axios": "^1.15.0",
|
|
39
45
|
"class-transformer": "^0.5.1",
|
|
40
46
|
"class-validator": "^0.15.1",
|
|
@@ -48,29 +54,13 @@
|
|
|
48
54
|
"rxjs": "^7.8.2"
|
|
49
55
|
},
|
|
50
56
|
"devDependencies": {
|
|
51
|
-
"@types/
|
|
57
|
+
"@types/cookie-parser": "^1.4.10",
|
|
58
|
+
"@types/passport-jwt": "^4.0.1",
|
|
59
|
+
"vitest": "^4.1.6",
|
|
60
|
+
"@swc/core": "^1.15.33",
|
|
61
|
+
"unplugin-swc": "^1.5.9"
|
|
52
62
|
},
|
|
53
63
|
"files": [
|
|
54
64
|
"dist"
|
|
55
|
-
]
|
|
56
|
-
"jest": {
|
|
57
|
-
"moduleFileExtensions": [
|
|
58
|
-
"js",
|
|
59
|
-
"json",
|
|
60
|
-
"ts"
|
|
61
|
-
],
|
|
62
|
-
"rootDir": "src",
|
|
63
|
-
"testRegex": ".*\\.spec\\.ts$",
|
|
64
|
-
"transform": {
|
|
65
|
-
"^.+\\.(t|j)s$": "ts-jest"
|
|
66
|
-
},
|
|
67
|
-
"transformIgnorePatterns": [
|
|
68
|
-
"node_modules/(?!jose/)"
|
|
69
|
-
],
|
|
70
|
-
"collectCoverageFrom": [
|
|
71
|
-
"**/*.(t|j)s"
|
|
72
|
-
],
|
|
73
|
-
"coverageDirectory": "../coverage",
|
|
74
|
-
"testEnvironment": "node"
|
|
75
|
-
}
|
|
65
|
+
]
|
|
76
66
|
}
|