@tomei/sso 0.60.2 → 0.60.4-dev.1
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/.husky/commit-msg +0 -6
- package/dist/src/components/login-user/user.js +1 -1
- package/dist/src/components/login-user/user.js.map +1 -1
- 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/login-user/user.ts +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
@@ -5,10 +5,11 @@ module.exports = {
|
|
5
5
|
async up(queryInterface, Sequelize) {
|
6
6
|
await queryInterface.createTable('sso_UserPasswordHistory', {
|
7
7
|
HistoryId: {
|
8
|
-
type: Sequelize.
|
9
|
-
autoIncrement: true,
|
8
|
+
type: Sequelize.STRING(30),
|
10
9
|
primaryKey: true,
|
11
10
|
allowNull: false,
|
11
|
+
onUpdate: 'CASCADE',
|
12
|
+
onDelete: 'CASCADE',
|
12
13
|
},
|
13
14
|
UserId: {
|
14
15
|
type: Sequelize.INTEGER,
|
package/package.json
CHANGED
@@ -18,12 +18,12 @@ export class UserPasswordHistory
|
|
18
18
|
|
19
19
|
private static _Repo = new UserPasswordHistoryRepository();
|
20
20
|
|
21
|
-
get HistoryId():
|
22
|
-
return
|
21
|
+
get HistoryId(): string {
|
22
|
+
return this.ObjectId;
|
23
23
|
}
|
24
24
|
|
25
|
-
set HistoryId(value:
|
26
|
-
this.ObjectId = value
|
25
|
+
set HistoryId(value: string) {
|
26
|
+
this.ObjectId = value;
|
27
27
|
}
|
28
28
|
|
29
29
|
get CreatedAt(): Date {
|
@@ -33,7 +33,7 @@ export class UserPasswordHistory
|
|
33
33
|
private constructor(params?: IUserPasswordHistoryAttr) {
|
34
34
|
super();
|
35
35
|
if (params) {
|
36
|
-
this.ObjectId = params.HistoryId
|
36
|
+
this.ObjectId = params.HistoryId;
|
37
37
|
this.UserId = params.UserId;
|
38
38
|
this.PasswordHash = params.PasswordHash;
|
39
39
|
this._CreatedAt = params.CreatedAt;
|
@@ -149,8 +149,10 @@ export class UserPasswordHistory
|
|
149
149
|
) || 3;
|
150
150
|
|
151
151
|
// Part 3: Insert new password history by calling class _repo create() method.
|
152
|
+
const userPasswordHistory = new UserPasswordHistory();
|
152
153
|
let passwordHistory = await UserPasswordHistory._Repo.create(
|
153
154
|
{
|
155
|
+
HistoryId: userPasswordHistory.createId(),
|
154
156
|
UserId: UserId,
|
155
157
|
PasswordHash: PasswordHash,
|
156
158
|
},
|
@@ -23,10 +23,9 @@ export default class UserPasswordHistoryModel
|
|
23
23
|
@Column({
|
24
24
|
primaryKey: true,
|
25
25
|
allowNull: false,
|
26
|
-
type: DataType.
|
27
|
-
autoIncrement: true,
|
26
|
+
type: DataType.STRING(30),
|
28
27
|
})
|
29
|
-
HistoryId:
|
28
|
+
HistoryId: string;
|
30
29
|
|
31
30
|
@ForeignKey(() => User)
|
32
31
|
@Column({
|