@tomei/sso 0.60.2 → 0.60.3
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/src/components/user-password-history/user-password-history.d.ts +2 -2
- package/dist/src/components/user-password-history/user-password-history.js +5 -3
- package/dist/src/components/user-password-history/user-password-history.js.map +1 -1
- package/dist/src/components/user-password-history/user-password-history.repository.d.ts +1 -1
- package/dist/src/interfaces/user-password-history.interface.d.ts +1 -1
- package/dist/src/models/user-password-history.d.ts +1 -1
- package/dist/src/models/user-password-history.js +2 -3
- package/dist/src/models/user-password-history.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/20250326043818-crate-user-password-history.js +3 -2
- package/package.json +1 -1
- package/src/components/user-password-history/user-password-history.repository.ts +1 -1
- package/src/components/user-password-history/user-password-history.ts +7 -5
- package/src/interfaces/user-password-history.interface.ts +1 -1
- package/src/models/user-password-history.ts +2 -3
@@ -10,8 +10,8 @@ export declare class UserPasswordHistory extends ObjectBase implements IUserPass
|
|
10
10
|
PasswordHash: string;
|
11
11
|
private _CreatedAt;
|
12
12
|
private static _Repo;
|
13
|
-
get HistoryId():
|
14
|
-
set HistoryId(value:
|
13
|
+
get HistoryId(): string;
|
14
|
+
set HistoryId(value: string);
|
15
15
|
get CreatedAt(): Date;
|
16
16
|
private constructor();
|
17
17
|
static init(historyId?: number, dbTransaction?: any): Promise<UserPasswordHistory>;
|
@@ -15,10 +15,10 @@ const config_1 = require("@tomei/config");
|
|
15
15
|
const user_password_history_repository_1 = require("./user-password-history.repository");
|
16
16
|
class UserPasswordHistory extends general_1.ObjectBase {
|
17
17
|
get HistoryId() {
|
18
|
-
return
|
18
|
+
return this.ObjectId;
|
19
19
|
}
|
20
20
|
set HistoryId(value) {
|
21
|
-
this.ObjectId = value
|
21
|
+
this.ObjectId = value;
|
22
22
|
}
|
23
23
|
get CreatedAt() {
|
24
24
|
return this._CreatedAt;
|
@@ -28,7 +28,7 @@ class UserPasswordHistory extends general_1.ObjectBase {
|
|
28
28
|
this.ObjectType = 'UserPasswordHistory';
|
29
29
|
this.TableName = 'sso_UserPasswordHistory';
|
30
30
|
if (params) {
|
31
|
-
this.ObjectId = params.HistoryId
|
31
|
+
this.ObjectId = params.HistoryId;
|
32
32
|
this.UserId = params.UserId;
|
33
33
|
this.PasswordHash = params.PasswordHash;
|
34
34
|
this._CreatedAt = params.CreatedAt;
|
@@ -82,7 +82,9 @@ class UserPasswordHistory extends general_1.ObjectBase {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
83
83
|
try {
|
84
84
|
const passwordHistoryPolicy = config_1.ComponentConfig.getComponentConfigValue('@tomei/sso', 'passwordHistory') || 3;
|
85
|
+
const userPasswordHistory = new UserPasswordHistory();
|
85
86
|
let passwordHistory = yield UserPasswordHistory._Repo.create({
|
87
|
+
HistoryId: userPasswordHistory.createId(),
|
86
88
|
UserId: UserId,
|
87
89
|
PasswordHash: PasswordHash,
|
88
90
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user-password-history.js","sourceRoot":"","sources":["../../../../src/components/user-password-history/user-password-history.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,0CAAgD;AAEhD,yFAAmF;AAGnF,MAAa,mBACX,SAAQ,oBAAU;IAalB,IAAI,SAAS;QACX,OAAO,
|
1
|
+
{"version":3,"file":"user-password-history.js","sourceRoot":"","sources":["../../../../src/components/user-password-history/user-password-history.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,0CAAgD;AAEhD,yFAAmF;AAGnF,MAAa,mBACX,SAAQ,oBAAU;IAalB,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,SAAS,CAAC,KAAa;QACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,C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AQ,EAAE;oBACzC,MAAM,EAAE,MAAM;oBACd,YAAY,EAAE,YAAY;iBAC3B,EACD;oBACE,WAAW,EAAE,aAAa;iBAC3B,CACF,CAAC;gBAKF,IAAI,eAAe,EAAE,CAAC;oBACpB,IAAI,mBAAmB,GAAG,MAAM,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC;wBAChE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;wBACzB,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;wBAC9B,WAAW,EAAE,aAAa;qBAC3B,CAAC,CAAC;oBAEH,IAAI,mBAAmB,CAAC,MAAM,GAAG,qBAAqB,EAAE,CAAC;wBACvD,IAAI,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;wBAClE,IAAI,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;wBACjE,MAAM,mBAAmB,CAAC,KAAK,CAAC,eAAe,CAC7C,aAAa,EACb,aAAa,CACd,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;;AAnLH,kDAoLC;AAxKgB,yBAAK,GAAG,IAAI,gEAA6B,EAAE,AAAtC,CAAuC"}
|
@@ -4,5 +4,5 @@ export declare class UserPasswordHistoryRepository extends RepositoryBase<UserPa
|
|
4
4
|
constructor();
|
5
5
|
findByPk(id: string, options?: any): Promise<UserPasswordHistoryModel>;
|
6
6
|
destroy(HistoryId: number, dbTransaction: any): Promise<void>;
|
7
|
-
destroyMultiple(HistoryIdList:
|
7
|
+
destroyMultiple(HistoryIdList: string[], dbTransaction: any): Promise<void>;
|
8
8
|
}
|
@@ -2,7 +2,7 @@ import { Model } from 'sequelize-typescript';
|
|
2
2
|
import User from './user.entity';
|
3
3
|
import { IUserPasswordHistoryAttr } from '../interfaces/user-password-history.interface';
|
4
4
|
export default class UserPasswordHistoryModel extends Model implements IUserPasswordHistoryAttr {
|
5
|
-
HistoryId:
|
5
|
+
HistoryId: string;
|
6
6
|
UserId: number;
|
7
7
|
PasswordHash: string;
|
8
8
|
CreatedAt: Date;
|
@@ -17,10 +17,9 @@ __decorate([
|
|
17
17
|
(0, sequelize_typescript_1.Column)({
|
18
18
|
primaryKey: true,
|
19
19
|
allowNull: false,
|
20
|
-
type: sequelize_typescript_1.DataType.
|
21
|
-
autoIncrement: true,
|
20
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
22
21
|
}),
|
23
|
-
__metadata("design:type",
|
22
|
+
__metadata("design:type", String)
|
24
23
|
], UserPasswordHistoryModel.prototype, "HistoryId", void 0);
|
25
24
|
__decorate([
|
26
25
|
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.default),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user-password-history.js","sourceRoot":"","sources":["../../../src/models/user-password-history.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAQ8B;AAC9B,+CAAiC;AASlB,IAAM,wBAAwB,GAA9B,MAAM,wBACnB,SAAQ,4BAAK;
|
1
|
+
{"version":3,"file":"user-password-history.js","sourceRoot":"","sources":["../../../src/models/user-password-history.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAQ8B;AAC9B,+CAAiC;AASlB,IAAM,wBAAwB,GAA9B,MAAM,wBACnB,SAAQ,4BAAK;CA+Bd,CAAA;AAvBC;IALC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;2DACgB;AAOlB;IALC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qBAAI,CAAC;IACtB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;wDACa;AAMf;IAJC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;KAC3B,CAAC;;8DACmB;AAGrB;IADC,gCAAS;8BACC,IAAI;2DAAC;AAMhB;IAJC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qBAAI,EAAE;QACrB,EAAE,EAAE,MAAM;QACV,UAAU,EAAE,QAAQ;KACrB,CAAC;8BACI,qBAAI;sDAAC;AA/BQ,wBAAwB;IAN5C,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,yBAAyB;QACpC,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,WAAW;KACvB,CAAC;GACmB,wBAAwB,CAgC5C;kBAhCoB,wBAAwB"}
|