@tomei/sso 0.1.1 → 0.2.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/README.md +20 -3
- package/__tests__/unit/components/login-history/login-history.repository.spec.ts +95 -0
- package/__tests__/unit/components/login-user/login-user.spec.ts +223 -0
- package/__tests__/unit/components/login-user/user.repository.spec.ts +81 -0
- package/__tests__/unit/components/password-hash/password-hash.service.spec.ts +33 -0
- package/__tests__/unit/components/system/system.repository.spec.ts +88 -0
- package/__tests__/unit/components/system-access/system-access.repository.spec.ts +78 -0
- package/__tests__/unit/redis-client/redis.service.spec.ts +24 -0
- package/__tests__/unit/session/session.service.spec.ts +27 -0
- package/create-sso-user.sql +8 -3
- package/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/login-user/login-user.spec.js +208 -0
- package/dist/__tests__/unit/components/login-user/login-user.spec.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.config.js +15 -0
- package/package.json +21 -3
- package/prisma/migrations/0_init/migration.sql +512 -521
- package/prisma/migrations/20230528161352_create_user_user_group_and_add_new_column/migration.sql +35 -0
- package/prisma/migrations/20230606091407_create_login_histories_table/migration.sql +17 -0
- package/prisma/migrations/migration_lock.toml +2 -2
- package/prisma/schema.prisma +519 -436
- package/sampledotenv +8 -0
- package/src/components/index.ts +7 -0
- package/src/components/login-history/index.ts +1 -0
- package/src/components/login-history/login-history.repository.ts +33 -0
- package/src/components/login-user/index.ts +4 -0
- package/src/components/login-user/interfaces/index.ts +1 -0
- package/src/components/login-user/interfaces/user-info.interface.ts +9 -0
- package/src/components/login-user/login-user.ts +427 -0
- package/src/components/login-user/user.repository.ts +33 -0
- package/src/components/password-hash/index.ts +2 -0
- package/src/components/password-hash/interfaces/index.ts +1 -0
- package/src/components/password-hash/interfaces/password-hash-service.interface.ts +4 -0
- package/src/components/password-hash/password-hash.service.ts +14 -0
- package/src/components/system/index.ts +1 -0
- package/src/components/system/system.repository.ts +33 -0
- package/src/components/system-access/index.ts +1 -0
- package/src/components/system-access/system-access.repository.ts +33 -0
- package/src/components/user-group/index.ts +1 -0
- package/src/components/user-group/user-group.repository.ts +33 -0
- package/src/components/user-user-group/index.ts +1 -0
- package/src/components/user-user-group/user-user-group.repository.ts +33 -0
- package/src/index.ts +7 -0
- package/src/interfaces/index.ts +2 -0
- package/src/interfaces/system-login.interface.ts +6 -0
- package/src/interfaces/user-session.interface.ts +5 -0
- package/src/mail/index.ts +2 -0
- package/src/mail/interfaces/index.ts +2 -0
- package/src/mail/interfaces/send-mail.interface.ts +8 -0
- package/src/mail/interfaces/send-new-login-alert.interface.ts +6 -0
- package/src/mail/mail.service.ts +33 -0
- package/src/mail/mail.ts +40 -0
- package/src/prisma-client/__mocks__/prisma.ts +15 -0
- package/src/prisma-client/client.ts +3 -0
- package/src/prisma-client/index.ts +1 -0
- package/src/redis-client/__mocks__/jest-initial-setup.ts +2 -0
- package/src/redis-client/__mocks__/redis-mock.ts +28 -0
- package/src/redis-client/index.ts +1 -0
- package/src/redis-client/redis.service.ts +48 -0
- package/src/session/index.ts +2 -0
- package/src/session/interfaces/index.ts +1 -0
- package/src/session/interfaces/session-service.interface.ts +6 -0
- package/src/session/session.service.ts +45 -0
- package/tsconfig.json +7 -3
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -1
- package/dist/index.js.map +0 -1
package/create-sso-user.sql
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
|
-
--
|
2
|
+
-- example to create sso-user
|
3
3
|
CREATE USER 'sso_user'@'environment' IDENTIFIED BY 'password';
|
4
4
|
|
5
|
-
--
|
5
|
+
-- example to grant neccesary access to run migration
|
6
6
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_authorization_codes TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
7
7
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_bearer_tokens TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
8
8
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_building_types TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
@@ -32,4 +32,9 @@ GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on product
|
|
32
32
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_users TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
33
33
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_usersystemprivilege TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
34
34
|
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_usersystemrole TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
35
|
-
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.
|
35
|
+
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production.sso_UserUserGroup TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
36
|
+
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES on production._prisma_migrations TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
37
|
+
|
38
|
+
|
39
|
+
-- Grant user to create, alter, drop, references on the database (required for creating shadow tables)
|
40
|
+
GRANT CREATE, ALTER, DROP, REFERENCES ON shadow_database.* TO 'sso_user'@'localhost' WITH GRANT OPTION;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,208 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const src_1 = require("../../../../src");
|
13
|
+
const login_user_1 = require("../../../../src/components/login-user/login-user");
|
14
|
+
const user_repository_1 = require("../../../../src/components/login-user/user.repository");
|
15
|
+
const password_hash_service_1 = require("../../../../src/components/password-hash/password-hash.service");
|
16
|
+
const mail_service_1 = require("../../../../src/mail/mail.service");
|
17
|
+
describe('login-user', () => {
|
18
|
+
const user = {
|
19
|
+
id: 755,
|
20
|
+
email: 'ezcash+florence@tomei.com.my',
|
21
|
+
password: '$argon2id$v=19$m=4096,t=3,p=1$571ilUAi9n5g393m/NqKbQ$2bMnLtMCIVTjHWHGEDxI2wo+A3mrL3N5rTxDJ6ydPi8',
|
22
|
+
status: null,
|
23
|
+
defaultPasswordChanged: false,
|
24
|
+
firstLoginAt: new Date('2023-01-10T07:57:10.000Z'),
|
25
|
+
createdAt: new Date('2023-01-10T07:57:10.000Z'),
|
26
|
+
updatedAt: new Date('2023-01-10T08:58:15.000Z'),
|
27
|
+
groupCode: 'EZCFT',
|
28
|
+
staffs: [
|
29
|
+
{
|
30
|
+
id: 740,
|
31
|
+
staffId: 'EZC003',
|
32
|
+
fullName: 'EZC Florence',
|
33
|
+
preferredName: 'EZC Florence',
|
34
|
+
email: 'ezcash+florence@tomei.com.my',
|
35
|
+
staffTypeId: 1,
|
36
|
+
jobTitle: 'EZC Finance',
|
37
|
+
carPlate: '',
|
38
|
+
mobile: '60123456',
|
39
|
+
floor: null,
|
40
|
+
extension: null,
|
41
|
+
isCharge: false,
|
42
|
+
status: 'active',
|
43
|
+
userId: 755,
|
44
|
+
buildingId: 20,
|
45
|
+
departmentId: 110,
|
46
|
+
companyId: 70,
|
47
|
+
createdById: 74,
|
48
|
+
updatedById: 74,
|
49
|
+
createdAt: new Date('2023-01-10T07:57:10.000Z'),
|
50
|
+
updatedAt: new Date('2023-01-10T07:57:10.000Z'),
|
51
|
+
image: null,
|
52
|
+
idNo: '123123123',
|
53
|
+
fullAddress: 'Lorem Address',
|
54
|
+
},
|
55
|
+
],
|
56
|
+
userSystemPrivileges: [
|
57
|
+
{
|
58
|
+
userId: 22,
|
59
|
+
privilegeId: 'ckymxuh8t000137t011w89zgk',
|
60
|
+
isInheritedYN: 'N',
|
61
|
+
isRevokedYN: 'N',
|
62
|
+
createdAt: new Date('2022-04-18T04:07:40.000Z'),
|
63
|
+
updatedAt: new Date('2022-04-18T04:07:40.000Z'),
|
64
|
+
systemPrivilege: {
|
65
|
+
privilegeId: 'ckymxuh8t000137t011w89zgk',
|
66
|
+
systemId: 11,
|
67
|
+
code: 'Own',
|
68
|
+
module: null,
|
69
|
+
description: 'Allows the user to only view consignments belonging to themselves',
|
70
|
+
createdAt: new Date('2022-01-20T12:16:26.000Z'),
|
71
|
+
updatedAt: new Date('2022-01-20T12:16:26.000Z'),
|
72
|
+
},
|
73
|
+
},
|
74
|
+
],
|
75
|
+
};
|
76
|
+
const system = {
|
77
|
+
id: 175,
|
78
|
+
code: 'EZC',
|
79
|
+
name: 'EzCash',
|
80
|
+
description: 'Tomei Money Lending System',
|
81
|
+
accessUrl: 'https://app.ezcash.com.my:22443/staff/login',
|
82
|
+
googlePlayUrl: '',
|
83
|
+
appleStoreUrl: '',
|
84
|
+
apiKey: 'VqS9ks2Lwvqd7HrVUMMIP2q7zaEH689HCPaEaFUQLmiRoZnt',
|
85
|
+
logo: 'https://sso-api.tomei.com.my/upload/2023/01/10/FJ3DoHdRZKjf2bGkgA4E-BrowserIcon.png',
|
86
|
+
status: 'active',
|
87
|
+
visible: true,
|
88
|
+
createdAt: new Date('2023-01-09T00:45:57.000Z'),
|
89
|
+
updatedAt: new Date('2023-01-10T06:28:56.000Z'),
|
90
|
+
apiSecret: '$argon2id$v=19$m=4096,t=3,p=1$lqxfk/ujftswf2jSEu156g$j2IShE/BZUUoH/1jrvt3GGRSy0rA8HilJvK17e6vdFY',
|
91
|
+
updatedById: 61,
|
92
|
+
createdById: 100,
|
93
|
+
};
|
94
|
+
const systemAccess = {
|
95
|
+
userId: 755,
|
96
|
+
systemId: 175,
|
97
|
+
updatedAt: new Date('2023-01-09T00:45:57.000'),
|
98
|
+
};
|
99
|
+
const session = {
|
100
|
+
systemLogins: [
|
101
|
+
{
|
102
|
+
id: '175',
|
103
|
+
code: 'EZC',
|
104
|
+
sessionId: 'ckymxuh8t000137t011w89zgk',
|
105
|
+
privileges: [
|
106
|
+
'Terminate',
|
107
|
+
'Download - Agreement',
|
108
|
+
'Disbursement - Confirmation',
|
109
|
+
'Invoice Payment Received',
|
110
|
+
'Download - Disbursement Receipt',
|
111
|
+
'Download - Stamping Receipt',
|
112
|
+
'Installment Payment Received',
|
113
|
+
'View Transaction History',
|
114
|
+
'Menu - Loans',
|
115
|
+
'Loan - Full Settlement',
|
116
|
+
'View Billing',
|
117
|
+
'Loan - Retrieve List',
|
118
|
+
'Loan - View Details',
|
119
|
+
'Loan - Retrieve Outstanding',
|
120
|
+
'Loan - View Mandate Details',
|
121
|
+
'Loan Document - Retrieve List',
|
122
|
+
'Loan Document - View',
|
123
|
+
'Loan Document - Download',
|
124
|
+
'Application - View Details',
|
125
|
+
'Simple Loan Schedule - Get Overdue Schedules',
|
126
|
+
'Simple Loan Schedule - Get Schedule Payment Details',
|
127
|
+
'Retrieve Media List',
|
128
|
+
'Retrieve Customer List',
|
129
|
+
'View Loan Activity',
|
130
|
+
'Activate Installment',
|
131
|
+
'Manual Payment Receipt',
|
132
|
+
'Customer Documents - View',
|
133
|
+
],
|
134
|
+
},
|
135
|
+
],
|
136
|
+
};
|
137
|
+
jest.mock('crypto', () => {
|
138
|
+
return {
|
139
|
+
randomUUID: jest.fn().mockReturnValue('ckymxuh8t000137t011w89zgk'),
|
140
|
+
};
|
141
|
+
});
|
142
|
+
jest
|
143
|
+
.spyOn(user_repository_1.UserRepository.prototype, 'findOne')
|
144
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
145
|
+
return user;
|
146
|
+
}));
|
147
|
+
jest
|
148
|
+
.spyOn(password_hash_service_1.PasswordHashService.prototype, 'verify')
|
149
|
+
.mockImplementation((password, hash) => __awaiter(void 0, void 0, void 0, function* () {
|
150
|
+
if (password === 'Abcd@1234') {
|
151
|
+
return true;
|
152
|
+
}
|
153
|
+
else {
|
154
|
+
return false;
|
155
|
+
}
|
156
|
+
}));
|
157
|
+
jest
|
158
|
+
.spyOn(src_1.SystemRepository.prototype, 'findOne')
|
159
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
160
|
+
return system;
|
161
|
+
}));
|
162
|
+
jest
|
163
|
+
.spyOn(mail_service_1.MailService.prototype, 'sendNewLoginAlertEmail')
|
164
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () { }));
|
165
|
+
jest
|
166
|
+
.spyOn(login_user_1.LoginUser.prototype, 'getPrivileges')
|
167
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
168
|
+
return session.systemLogins[0].privileges;
|
169
|
+
}));
|
170
|
+
jest
|
171
|
+
.spyOn(src_1.SystemAccessRepository.prototype, 'findOne')
|
172
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
173
|
+
return systemAccess;
|
174
|
+
}));
|
175
|
+
jest
|
176
|
+
.spyOn(src_1.LoginHistoryRepository.prototype, 'findAll')
|
177
|
+
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
178
|
+
const data = [];
|
179
|
+
return data;
|
180
|
+
}));
|
181
|
+
it('should return login-user service when instansiated', () => __awaiter(void 0, void 0, void 0, function* () {
|
182
|
+
const loginUser = yield login_user_1.LoginUser.init();
|
183
|
+
expect(loginUser).toBeDefined();
|
184
|
+
}));
|
185
|
+
it('should able to do login process when no session is already available', () => __awaiter(void 0, void 0, void 0, function* () {
|
186
|
+
const loginUser = yield login_user_1.LoginUser.init('755');
|
187
|
+
const result = yield loginUser.login('EZC', 'ezcash+florence@tomei.com.my', 'Abcd@1234', '1.1.1.1');
|
188
|
+
expect(result).toEqual('ckymxuh8t000137t011w89zgk');
|
189
|
+
}));
|
190
|
+
it('should able to do login process when session is already available', () => __awaiter(void 0, void 0, void 0, function* () {
|
191
|
+
jest
|
192
|
+
.spyOn(src_1.SessionService.prototype, 'retrieveUserSession')
|
193
|
+
.mockImplementationOnce((userId) => __awaiter(void 0, void 0, void 0, function* () {
|
194
|
+
if (userId === '755') {
|
195
|
+
return session;
|
196
|
+
}
|
197
|
+
else {
|
198
|
+
return {
|
199
|
+
systemLogins: [],
|
200
|
+
};
|
201
|
+
}
|
202
|
+
}));
|
203
|
+
const loginUser = yield login_user_1.LoginUser.init('755');
|
204
|
+
const result = yield loginUser.login('EZC', 'ezcash+florence@tomei.com.my', 'Abcd@1234', '1.1.1.1');
|
205
|
+
expect(result).toEqual('ckymxuh8t000137t011w89zgk');
|
206
|
+
}));
|
207
|
+
});
|
208
|
+
//# sourceMappingURL=login-user.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"login-user.spec.js","sourceRoot":"","sources":["../../../../../__tests__/unit/components/login-user/login-user.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,yCAAmH;AACnH,iFAA6E;AAC7E,2FAAuF;AACvF,0GAAqG;AACrG,oEAAgE;AAChE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,MAAM,IAAI,GAAG;QACX,EAAE,EAAE,GAAG;QACP,KAAK,EAAE,8BAA8B;QACrC,QAAQ,EACN,kGAAkG;QACpG,MAAM,EAAE,IAAI;QACZ,sBAAsB,EAAE,KAAK;QAC7B,YAAY,E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