@darraghor/nest-backend-libs 2.20.4 → 2.20.6
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/authz/DefaultAuthGuard.js +3 -1
- package/dist/authz/DefaultAuthGuard.js.map +1 -1
- package/dist/authz/UserValidation.service.d.ts +13 -0
- package/dist/authz/UserValidation.service.js +99 -0
- package/dist/authz/UserValidation.service.js.map +1 -0
- package/dist/authz/authz.module.js +7 -3
- package/dist/authz/authz.module.js.map +1 -1
- package/dist/authz/authzstrategy.d.ts +3 -3
- package/dist/authz/authzstrategy.js +6 -6
- package/dist/authz/authzstrategy.js.map +1 -1
- package/dist/person/person.module.js +1 -7
- package/dist/person/person.module.js.map +1 -1
- package/dist/person/person.service.d.ts +1 -8
- package/dist/person/person.service.js +2 -67
- package/dist/person/person.service.js.map +1 -1
- package/dist/root-app/core-app.module.js +2 -0
- package/dist/root-app/core-app.module.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,9 @@ let DefaultAuthGuard = class DefaultAuthGuard extends (0, passport_1.AuthGuard)(
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
DefaultAuthGuard = __decorate([
|
|
21
|
-
(0, common_1.Injectable)()
|
|
21
|
+
(0, common_1.Injectable)()
|
|
22
|
+
// eslint-disable-next-line @darraghor/nestjs-typed/injectable-should-be-provided
|
|
23
|
+
,
|
|
22
24
|
__metadata("design:paramtypes", [])
|
|
23
25
|
], DefaultAuthGuard);
|
|
24
26
|
exports.DefaultAuthGuard = DefaultAuthGuard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAuthGuard.js","sourceRoot":"","sources":["../../src/authz/DefaultAuthGuard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0C;AAC1C,+CAA2C;
|
|
1
|
+
{"version":3,"file":"DefaultAuthGuard.js","sourceRoot":"","sources":["../../src/authz/DefaultAuthGuard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0C;AAC1C,+CAA2C;AAIpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,oBAAS,EAAC,KAAK,CAAC;IAClD;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;CACJ,CAAA;AAJY,gBAAgB;IAF5B,IAAA,mBAAU,GAAE;IACb,iFAAiF;;;GACpE,gBAAgB,CAI5B;AAJY,4CAAgB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Repository } from "typeorm";
|
|
2
|
+
import { AuthZClientService } from "../authzclient/authz.service";
|
|
3
|
+
import { UserProfile } from "../authzclient/UserProfile.dto";
|
|
4
|
+
import { Person } from "../person";
|
|
5
|
+
import { AccessToken } from "./AccessToken";
|
|
6
|
+
export declare class UserValidationService {
|
|
7
|
+
private repository;
|
|
8
|
+
private authzClient;
|
|
9
|
+
constructor(repository: Repository<Person>, authzClient: AuthZClientService);
|
|
10
|
+
getAuth0User(payload: AccessToken, rawAccessToken: string): Promise<UserProfile | undefined>;
|
|
11
|
+
validateUser(payload: AccessToken, rawAccessToken: string): Promise<Person | undefined>;
|
|
12
|
+
updatePersonFromAuth0(person: Person, auth0User: UserProfile): Promise<Person>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __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
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UserValidationService = void 0;
|
|
16
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const authz_service_1 = require("../authzclient/authz.service");
|
|
21
|
+
const organisation_membership_entity_1 = require("../organisation-memberships/entities/organisation-membership.entity");
|
|
22
|
+
const RolesEnum_1 = require("../organisation/dto/RolesEnum");
|
|
23
|
+
const member_role_entity_1 = require("../organisation/entities/member-role.entity");
|
|
24
|
+
const organisation_entity_1 = require("../organisation/entities/organisation.entity");
|
|
25
|
+
const person_1 = require("../person");
|
|
26
|
+
let UserValidationService = class UserValidationService {
|
|
27
|
+
repository;
|
|
28
|
+
authzClient;
|
|
29
|
+
constructor(repository, authzClient) {
|
|
30
|
+
this.repository = repository;
|
|
31
|
+
this.authzClient = authzClient;
|
|
32
|
+
}
|
|
33
|
+
async getAuth0User(payload, rawAccessToken) {
|
|
34
|
+
return await this.authzClient.getUser(rawAccessToken);
|
|
35
|
+
}
|
|
36
|
+
async validateUser(payload, rawAccessToken) {
|
|
37
|
+
// try to find the person and their memberships
|
|
38
|
+
const foundPerson = await this.repository.findOne({
|
|
39
|
+
where: { auth0UserId: payload.sub },
|
|
40
|
+
relations: {
|
|
41
|
+
memberships: true,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
// if person already configured then get out of here
|
|
45
|
+
if (foundPerson !== undefined &&
|
|
46
|
+
foundPerson !== null &&
|
|
47
|
+
foundPerson.memberships.length > 0) {
|
|
48
|
+
return foundPerson;
|
|
49
|
+
}
|
|
50
|
+
// if no person is found locally then get the user's profile details from auth0
|
|
51
|
+
const auth0User = await this.getAuth0User(payload, rawAccessToken);
|
|
52
|
+
if (auth0User === undefined) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
// create a new organisation
|
|
56
|
+
const unsavedOrganisation = new organisation_entity_1.Organisation();
|
|
57
|
+
unsavedOrganisation.name = auth0User.given_name
|
|
58
|
+
? `${auth0User.given_name}'s Organisation`
|
|
59
|
+
: `My Organisation`;
|
|
60
|
+
// create roles
|
|
61
|
+
const ownerRole = new member_role_entity_1.MembershipRole();
|
|
62
|
+
ownerRole.name = RolesEnum_1.Roles.owner;
|
|
63
|
+
// create a new membership
|
|
64
|
+
const membership = new organisation_membership_entity_1.OrganisationMembership();
|
|
65
|
+
membership.organisation = unsavedOrganisation;
|
|
66
|
+
membership.roles = [ownerRole];
|
|
67
|
+
if (foundPerson !== undefined && foundPerson !== null) {
|
|
68
|
+
// if person already exists then add the membership to the existing person
|
|
69
|
+
foundPerson.memberships = [membership];
|
|
70
|
+
return this.repository.save(foundPerson);
|
|
71
|
+
}
|
|
72
|
+
const person = this.repository.create();
|
|
73
|
+
person.memberships = [membership];
|
|
74
|
+
// eslint-disable-next-line sonarjs/prefer-immediate-return
|
|
75
|
+
const updatedPerson = this.updatePersonFromAuth0(person, auth0User);
|
|
76
|
+
return updatedPerson;
|
|
77
|
+
}
|
|
78
|
+
async updatePersonFromAuth0(person, auth0User) {
|
|
79
|
+
person.auth0UserId = auth0User.sub;
|
|
80
|
+
person.blocked = false;
|
|
81
|
+
person.email = auth0User.email;
|
|
82
|
+
person.emailVerified = auth0User.email_verified;
|
|
83
|
+
person.familyName = auth0User.family_name;
|
|
84
|
+
person.givenName = auth0User.given_name;
|
|
85
|
+
person.name = auth0User.name;
|
|
86
|
+
person.picture = auth0User.picture;
|
|
87
|
+
person.username = auth0User.preferred_username;
|
|
88
|
+
// save person
|
|
89
|
+
return this.repository.save(person);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
UserValidationService = __decorate([
|
|
93
|
+
(0, common_1.Injectable)(),
|
|
94
|
+
__param(0, (0, typeorm_1.InjectRepository)(person_1.Person)),
|
|
95
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
96
|
+
authz_service_1.AuthZClientService])
|
|
97
|
+
], UserValidationService);
|
|
98
|
+
exports.UserValidationService = UserValidationService;
|
|
99
|
+
//# sourceMappingURL=UserValidation.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserValidation.service.js","sourceRoot":"","sources":["../../src/authz/UserValidation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,6CAAiD;AACjD,qCAAmC;AACnC,gEAAgE;AAEhE,wHAA2G;AAC3G,6DAAoD;AACpD,oFAA2E;AAC3E,sFAA0E;AAC1E,sCAAiC;AAI1B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAGlB;IACA;IAHZ,YAEY,UAA8B,EAC9B,WAA+B;QAD/B,eAAU,GAAV,UAAU,CAAoB;QAC9B,gBAAW,GAAX,WAAW,CAAoB;IACxC,CAAC;IAEJ,KAAK,CAAC,YAAY,CACd,OAAoB,EACpB,cAAsB;QAEtB,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,YAAY,CACd,OAAoB,EACpB,cAAsB;QAEtB,+CAA+C;QAC/C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,CAAC,GAAG,EAAC;YACjC,SAAS,EAAE;gBACP,WAAW,EAAE,IAAI;aACpB;SACJ,CAAC,CAAC;QAEH,oDAAoD;QACpD,IACI,WAAW,KAAK,SAAS;YACzB,WAAW,KAAK,IAA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C9D,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC;QACnC,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;QAC/B,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,cAAc,CAAC;QAChD,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC;QAC1C,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC;QACxC,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAC7B,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;QACnC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,kBAAkB,CAAC;QAE/C,cAAc;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACJ,CAAA;AAnFY,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,eAAM,CAAC,CAAA;qCACL,oBAAU;QACT,kCAAkB;GAJlC,qBAAqB,CAmFjC;AAnFY,sDAAqB"}
|
|
@@ -13,22 +13,26 @@ exports.AuthzModule = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const passport_1 = require("@nestjs/passport");
|
|
15
15
|
const logger_module_1 = require("../logger/logger.module");
|
|
16
|
-
const person_module_1 = require("../person/person.module");
|
|
17
16
|
const AuthConfigurationService_1 = require("./AuthConfigurationService");
|
|
18
17
|
const authzstrategy_1 = require("./authzstrategy");
|
|
19
18
|
const AuthConfigurationVariables_1 = __importDefault(require("./AuthConfigurationVariables"));
|
|
20
19
|
const config_1 = require("@nestjs/config");
|
|
20
|
+
const UserValidation_service_1 = require("./UserValidation.service");
|
|
21
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
22
|
+
const person_entity_1 = require("../person/entities/person.entity");
|
|
23
|
+
const authz_client_module_1 = require("../authzclient/authz-client.module");
|
|
21
24
|
let AuthzModule = class AuthzModule {
|
|
22
25
|
};
|
|
23
26
|
AuthzModule = __decorate([
|
|
24
27
|
(0, common_1.Module)({
|
|
25
28
|
imports: [
|
|
26
29
|
config_1.ConfigModule.forFeature(AuthConfigurationVariables_1.default),
|
|
30
|
+
typeorm_1.TypeOrmModule.forFeature([person_entity_1.Person]),
|
|
27
31
|
passport_1.PassportModule.register({ defaultStrategy: "jwt" }),
|
|
28
32
|
logger_module_1.LoggerModule,
|
|
29
|
-
|
|
33
|
+
authz_client_module_1.AuthzClientModule,
|
|
30
34
|
],
|
|
31
|
-
providers: [authzstrategy_1.JwtStrategy, AuthConfigurationService_1.AuthConfigurationService],
|
|
35
|
+
providers: [authzstrategy_1.JwtStrategy, AuthConfigurationService_1.AuthConfigurationService, UserValidation_service_1.UserValidationService],
|
|
32
36
|
exports: [passport_1.PassportModule, AuthConfigurationService_1.AuthConfigurationService],
|
|
33
37
|
})
|
|
34
38
|
], AuthzModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz.module.js","sourceRoot":"","sources":["../../src/authz/authz.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"authz.module.js","sourceRoot":"","sources":["../../src/authz/authz.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,+CAAgD;AAChD,2DAAqD;AACrD,yEAAoE;AACpE,mDAA4C;AAC5C,8FAA2D;AAC3D,2CAA4C;AAC5C,qEAA+D;AAC/D,6CAA8C;AAC9C,oEAAwD;AACxD,4EAAqE;AAa9D,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,WAAW;IAXvB,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,qBAAY,CAAC,UAAU,CAAC,oCAAe,CAAC;YACxC,uBAAa,CAAC,UAAU,CAAC,CAAC,sBAAM,CAAC,CAAC;YAClC,yBAAc,CAAC,QAAQ,CAAC,EAAC,eAAe,EAAE,KAAK,EAAC,CAAC;YACjD,4BAAY;YACZ,uCAAiB;SACpB;QACD,SAAS,EAAE,CAAC,2BAAW,EAAE,mDAAwB,EAAE,8CAAqB,CAAC;QACzE,OAAO,EAAE,CAAC,yBAAc,EAAE,mDAAwB,CAAC;KACtD,CAAC;GACW,WAAW,CAAG;AAAd,kCAAW"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Strategy } from "passport-jwt";
|
|
2
|
-
import { PersonService } from "../person/person.service";
|
|
3
2
|
import { AccessToken } from "./AccessToken";
|
|
4
3
|
import { Request } from "express";
|
|
5
4
|
import { AuthConfigurationService } from "./AuthConfigurationService";
|
|
6
5
|
import { RequestPerson } from "./RequestWithUser";
|
|
6
|
+
import { UserValidationService } from "./UserValidation.service";
|
|
7
7
|
declare const JwtStrategy_base: new (...args: any[]) => Strategy;
|
|
8
8
|
export declare class JwtStrategy extends JwtStrategy_base {
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly userValidationService;
|
|
10
10
|
private readonly logger;
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(userValidationService: UserValidationService, config: AuthConfigurationService);
|
|
12
12
|
validate(request: Request, payload: AccessToken): Promise<RequestPerson | undefined>;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -15,14 +15,14 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const passport_1 = require("@nestjs/passport");
|
|
16
16
|
const passport_jwt_1 = require("passport-jwt");
|
|
17
17
|
const jwks_rsa_1 = require("jwks-rsa");
|
|
18
|
-
const person_service_1 = require("../person/person.service");
|
|
19
18
|
const AuthConfigurationService_1 = require("./AuthConfigurationService");
|
|
19
|
+
const UserValidation_service_1 = require("./UserValidation.service");
|
|
20
20
|
let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
21
|
-
|
|
21
|
+
userValidationService;
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
23
23
|
// private readonly _config: AuthConfigurationService;
|
|
24
24
|
logger = new common_1.Logger(JwtStrategy_1.name);
|
|
25
|
-
constructor(
|
|
25
|
+
constructor(userValidationService, config) {
|
|
26
26
|
super({
|
|
27
27
|
secretOrKeyProvider: (0, jwks_rsa_1.passportJwtSecret)({
|
|
28
28
|
cache: true,
|
|
@@ -37,7 +37,7 @@ let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.Passp
|
|
|
37
37
|
issuer: `https://${config.auth0Domain}/`,
|
|
38
38
|
algorithms: ["RS256"],
|
|
39
39
|
});
|
|
40
|
-
this.
|
|
40
|
+
this.userValidationService = userValidationService;
|
|
41
41
|
}
|
|
42
42
|
async validate(request, payload) {
|
|
43
43
|
const rawAccessToken = passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken()(request);
|
|
@@ -45,7 +45,7 @@ let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.Passp
|
|
|
45
45
|
this.logger.error("Couldn't log the raw access token");
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
const personResult = await this.
|
|
48
|
+
const personResult = await this.userValidationService.validateUser(payload, rawAccessToken);
|
|
49
49
|
const withPermissions = { permissions: payload.permissions || [] };
|
|
50
50
|
// eslint-disable-next-line sonarjs/prefer-immediate-return
|
|
51
51
|
const rp = { ...personResult, ...withPermissions };
|
|
@@ -54,7 +54,7 @@ let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends (0, passport_1.Passp
|
|
|
54
54
|
};
|
|
55
55
|
JwtStrategy = JwtStrategy_1 = __decorate([
|
|
56
56
|
(0, common_1.Injectable)(),
|
|
57
|
-
__metadata("design:paramtypes", [
|
|
57
|
+
__metadata("design:paramtypes", [UserValidation_service_1.UserValidationService,
|
|
58
58
|
AuthConfigurationService_1.AuthConfigurationService])
|
|
59
59
|
], JwtStrategy);
|
|
60
60
|
exports.JwtStrategy = JwtStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authzstrategy.js","sourceRoot":"","sources":["../../src/authz/authzstrategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAkD;AAClD,+CAAkD;AAClD,+CAAkD;AAClD,uCAA2C;
|
|
1
|
+
{"version":3,"file":"authzstrategy.js","sourceRoot":"","sources":["../../src/authz/authzstrategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAkD;AAClD,+CAAkD;AAClD,+CAAkD;AAClD,uCAA2C;AAG3C,yEAAoE;AAEpE,qEAA+D;AAGxD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,IAAA,2BAAgB,EAAC,uBAAQ,CAAC;IAKlC;IAJrB,gEAAgE;IAChE,sDAAsD;IACrC,MAAM,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IACvD,YACqB,qBAA4C,EAC7D,MAAgC;QAEhC,KAAK,CAAC;YACF,mBAAmB,EAAE,IAAA,4BAAiB,EAAC;gBACnC,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE,IAAI;gBACf,qBAAqB,EAAE,CAAC;gBACxB,OAAO,EAAE,WAAW,MAAM,CAAC,WAAW,wBAAwB;aACjE,CAAC;YACF,iBAAiB,EAAE,IAAI;YACvB,iJAAiJ;YACjJ,cAAc,EAAE,yBAAU,CAAC,2BAA2B,EAAE;YACxD,QAAQ,EAAE,MAAM,CAAC,aAAa;YAC9B,MAAM,EAAE,WAAW,MAAM,CAAC,WAAW,GAAG;YACxC,UAAU,EAAE,CAAC,OAAO,CAAC;SACxB,CAAC,CAAC;QAhBc,0BAAqB,GAArB,qBAAqB,CAAuB;IAiBjE,CAAC;IAED,KAAK,CAAC,QAAQ,CACV,OAAgB,EAChB,OAAoB;QAEpB,MAAM,cAAc,GAChB,yBAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE;YACzD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACvD,OAAO;SACV;QAED,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAC9D,OAAO,EACP,cAAc,CACjB,CAAC;QAEF,MAAM,eAAe,GAAG,EAAC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE,EAAC,CAAC;QACjE,2DAA2D;QAC3D,MAAM,EAAE,GAAG,EAAC,GAAG,YAAY,EAAE,GAAG,eAAe,EAAkB,CAAC;QAClE,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AA7CY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAMmC,8CAAqB;QACrD,mDAAwB;GAN3B,WAAW,CA6CvB;AA7CY,kCAAW"}
|
|
@@ -13,18 +13,12 @@ const person_controller_1 = require("./person.controller");
|
|
|
13
13
|
const person_entity_1 = require("./entities/person.entity");
|
|
14
14
|
const logger_module_1 = require("../logger/logger.module");
|
|
15
15
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
16
|
-
const authz_client_module_1 = require("../authzclient/authz-client.module");
|
|
17
16
|
const core_app_module_1 = require("../root-app/core-app.module");
|
|
18
17
|
let PersonModule = class PersonModule {
|
|
19
18
|
};
|
|
20
19
|
PersonModule = __decorate([
|
|
21
20
|
(0, common_1.Module)({
|
|
22
|
-
imports: [
|
|
23
|
-
core_app_module_1.CoreModule,
|
|
24
|
-
logger_module_1.LoggerModule,
|
|
25
|
-
typeorm_1.TypeOrmModule.forFeature([person_entity_1.Person]),
|
|
26
|
-
(0, common_1.forwardRef)(() => authz_client_module_1.AuthzClientModule), // forwardRef is needed to avoid circular dependency (AuthzClientModule imports PersonModule)
|
|
27
|
-
],
|
|
21
|
+
imports: [core_app_module_1.CoreModule, logger_module_1.LoggerModule, typeorm_1.TypeOrmModule.forFeature([person_entity_1.Person])],
|
|
28
22
|
controllers: [person_controller_1.PersonController],
|
|
29
23
|
providers: [person_service_1.PersonService],
|
|
30
24
|
exports: [person_service_1.PersonService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.module.js","sourceRoot":"","sources":["../../src/person/person.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"person.module.js","sourceRoot":"","sources":["../../src/person/person.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsC;AACtC,qDAA+C;AAC/C,2DAAqD;AACrD,4DAAgD;AAChD,2DAAqD;AACrD,6CAA8C;AAC9C,iEAAuD;AAQhD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,YAAY;IANxB,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,4BAAU,EAAE,4BAAY,EAAE,uBAAa,CAAC,UAAU,CAAC,CAAC,sBAAM,CAAC,CAAC,CAAC;QACvE,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KAC3B,CAAC;GACW,YAAY,CAAG;AAAf,oCAAY"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { Repository } from "typeorm";
|
|
2
|
-
import { AccessToken } from "../authz/AccessToken";
|
|
3
2
|
import { RequestPerson } from "../authz/RequestWithUser";
|
|
4
|
-
import { AuthZClientService } from "../authzclient/authz.service";
|
|
5
|
-
import { UserProfile } from "../authzclient/UserProfile.dto";
|
|
6
3
|
import { UpdatePersonDto } from "./dto/update-person.dto";
|
|
7
4
|
import { Person } from "./entities/person.entity";
|
|
8
5
|
export declare class PersonService {
|
|
9
6
|
private repository;
|
|
10
|
-
private authzClient;
|
|
11
7
|
private readonly logger;
|
|
12
|
-
constructor(repository: Repository<Person
|
|
13
|
-
getAuth0User(payload: AccessToken, rawAccessToken: string): Promise<UserProfile | undefined>;
|
|
14
|
-
validateUser(payload: AccessToken, rawAccessToken: string): Promise<Person | undefined>;
|
|
15
|
-
updatePersonFromAuth0(person: Person, auth0User: UserProfile): Promise<Person>;
|
|
8
|
+
constructor(repository: Repository<Person>);
|
|
16
9
|
findAll(): Promise<Person[]>;
|
|
17
10
|
findOneByAuth0Id(auth0Id: string): Promise<Person | undefined>;
|
|
18
11
|
findOneIfSameOrganisation(uuid: string, currentUser: RequestPerson): Promise<Person>;
|
|
@@ -17,77 +17,13 @@ exports.PersonService = void 0;
|
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
18
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
19
|
const typeorm_2 = require("typeorm");
|
|
20
|
-
const authz_service_1 = require("../authzclient/authz.service");
|
|
21
|
-
const organisation_membership_entity_1 = require("../organisation-memberships/entities/organisation-membership.entity");
|
|
22
20
|
const RolesEnum_1 = require("../organisation/dto/RolesEnum");
|
|
23
|
-
const member_role_entity_1 = require("../organisation/entities/member-role.entity");
|
|
24
|
-
const organisation_entity_1 = require("../organisation/entities/organisation.entity");
|
|
25
21
|
const person_entity_1 = require("./entities/person.entity");
|
|
26
22
|
let PersonService = PersonService_1 = class PersonService {
|
|
27
23
|
repository;
|
|
28
|
-
authzClient;
|
|
29
24
|
logger = new common_1.Logger(PersonService_1.name);
|
|
30
|
-
constructor(repository
|
|
25
|
+
constructor(repository) {
|
|
31
26
|
this.repository = repository;
|
|
32
|
-
this.authzClient = authzClient;
|
|
33
|
-
}
|
|
34
|
-
async getAuth0User(payload, rawAccessToken) {
|
|
35
|
-
return await this.authzClient.getUser(rawAccessToken);
|
|
36
|
-
}
|
|
37
|
-
async validateUser(payload, rawAccessToken) {
|
|
38
|
-
// try to find the person and their memberships
|
|
39
|
-
const foundPerson = await this.repository.findOne({
|
|
40
|
-
where: { auth0UserId: payload.sub },
|
|
41
|
-
relations: {
|
|
42
|
-
memberships: true,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
// if person already configured then get out of here
|
|
46
|
-
if (foundPerson !== undefined &&
|
|
47
|
-
foundPerson !== null &&
|
|
48
|
-
foundPerson.memberships.length > 0) {
|
|
49
|
-
return foundPerson;
|
|
50
|
-
}
|
|
51
|
-
// if no person is found locally then get the user's profile details from auth0
|
|
52
|
-
const auth0User = await this.getAuth0User(payload, rawAccessToken);
|
|
53
|
-
if (auth0User === undefined) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
// create a new organisation
|
|
57
|
-
const unsavedOrganisation = new organisation_entity_1.Organisation();
|
|
58
|
-
unsavedOrganisation.name = auth0User.given_name
|
|
59
|
-
? `${auth0User.given_name}'s Organisation`
|
|
60
|
-
: `My Organisation`;
|
|
61
|
-
// create roles
|
|
62
|
-
const ownerRole = new member_role_entity_1.MembershipRole();
|
|
63
|
-
ownerRole.name = RolesEnum_1.Roles.owner;
|
|
64
|
-
// create a new membership
|
|
65
|
-
const membership = new organisation_membership_entity_1.OrganisationMembership();
|
|
66
|
-
membership.organisation = unsavedOrganisation;
|
|
67
|
-
membership.roles = [ownerRole];
|
|
68
|
-
if (foundPerson !== undefined && foundPerson !== null) {
|
|
69
|
-
// if person already exists then add the membership to the existing person
|
|
70
|
-
foundPerson.memberships = [membership];
|
|
71
|
-
return this.repository.save(foundPerson);
|
|
72
|
-
}
|
|
73
|
-
const person = this.repository.create();
|
|
74
|
-
person.memberships = [membership];
|
|
75
|
-
// eslint-disable-next-line sonarjs/prefer-immediate-return
|
|
76
|
-
const updatedPerson = this.updatePersonFromAuth0(person, auth0User);
|
|
77
|
-
return updatedPerson;
|
|
78
|
-
}
|
|
79
|
-
async updatePersonFromAuth0(person, auth0User) {
|
|
80
|
-
person.auth0UserId = auth0User.sub;
|
|
81
|
-
person.blocked = false;
|
|
82
|
-
person.email = auth0User.email;
|
|
83
|
-
person.emailVerified = auth0User.email_verified;
|
|
84
|
-
person.familyName = auth0User.family_name;
|
|
85
|
-
person.givenName = auth0User.given_name;
|
|
86
|
-
person.name = auth0User.name;
|
|
87
|
-
person.picture = auth0User.picture;
|
|
88
|
-
person.username = auth0User.preferred_username;
|
|
89
|
-
// save person
|
|
90
|
-
return this.repository.save(person);
|
|
91
27
|
}
|
|
92
28
|
async findAll() {
|
|
93
29
|
return this.repository.find();
|
|
@@ -172,8 +108,7 @@ let PersonService = PersonService_1 = class PersonService {
|
|
|
172
108
|
PersonService = PersonService_1 = __decorate([
|
|
173
109
|
(0, common_1.Injectable)(),
|
|
174
110
|
__param(0, (0, typeorm_1.InjectRepository)(person_entity_1.Person)),
|
|
175
|
-
__metadata("design:paramtypes", [typeorm_2.Repository
|
|
176
|
-
authz_service_1.AuthZClientService])
|
|
111
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
177
112
|
], PersonService);
|
|
178
113
|
exports.PersonService = PersonService;
|
|
179
114
|
//# sourceMappingURL=person.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.service.js","sourceRoot":"","sources":["../../src/person/person.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAiD;AACjD,qCAAmC;
|
|
1
|
+
{"version":3,"file":"person.service.js","sourceRoot":"","sources":["../../src/person/person.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAiD;AACjD,qCAAmC;AAEnC,6DAAoD;AAEpD,4DAAgD;AAGzC,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAIV;IAHK,MAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IACzD,YAEY,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;IACvC,CAAC;IAEJ,KAAK,CAAC,OAAO;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,OAAe;QAClC,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACjC,KAAK,EAAE;gBACH,WAA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
28
|
const Health_module_1 = require("../health/Health.module");
|
|
29
29
|
const logger_module_1 = require("../logger/logger.module");
|
|
30
30
|
const LoggingConfigurationService_1 = require("../logger/LoggingConfigurationService");
|
|
31
|
+
const authz_1 = require("../authz");
|
|
31
32
|
let CoreModule = class CoreModule {
|
|
32
33
|
static initApplication(
|
|
33
34
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
|
|
@@ -112,6 +113,7 @@ CoreModule = __decorate([
|
|
|
112
113
|
inject: [CoreConfigurationService_1.CoreConfigurationService],
|
|
113
114
|
}),
|
|
114
115
|
Health_module_1.HealthModule,
|
|
116
|
+
authz_1.AuthzModule,
|
|
115
117
|
],
|
|
116
118
|
controllers: [app_controller_1.AppController],
|
|
117
119
|
providers: [app_service_1.AppService, SwaggerGen_1.SwaggerGen],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,4BAA0B;AAC1B,oDAA4B;AAC5B,2CAMwB;AACxB,6CAAiD;AACjD,qDAA+C;AAC/C,+CAAyC;AACzC,6CAAwC;AACxC,uCAAoD;AACpD,sFAAiF;AACjF,wEAAkE;AAClE,2CAA4C;AAC5C,uCAAwC;AACxC,2DAAqD;AACrD,2DAA4E;AAC5E,uFAAkF;
|
|
1
|
+
{"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,4BAA0B;AAC1B,oDAA4B;AAC5B,2CAMwB;AACxB,6CAAiD;AACjD,qDAA+C;AAC/C,+CAAyC;AACzC,6CAAwC;AACxC,uCAAoD;AACpD,sFAAiF;AACjF,wEAAkE;AAClE,2CAA4C;AAC5C,uCAA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