@natrave/shared-entities 1.6.1 → 1.6.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/refresh-tokens/refresh-token.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refresh-token.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/refresh-tokens/refresh-token.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAYhC,qBAKa,YAAY;IAEvB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,SAAS,EAAE,MAAM,CAAC;IAQlB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAQpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQjC,oBAAoB,EAAE,MAAM,CAAC;IAO7B,MAAM,EAAE,MAAM,CAAC;IASf,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -15,8 +15,7 @@ import {
|
|
|
15
15
|
Index,
|
|
16
16
|
JoinColumn,
|
|
17
17
|
ManyToOne,
|
|
18
|
-
PrimaryGeneratedColumn
|
|
19
|
-
Unique
|
|
18
|
+
PrimaryGeneratedColumn
|
|
20
19
|
} from "typeorm";
|
|
21
20
|
import { User } from "../users/index.js";
|
|
22
21
|
let RefreshToken = class {
|
|
@@ -46,20 +45,11 @@ __decorateClass([
|
|
|
46
45
|
comment: "Data e hora em que o refresh token foi revogado, se aplic\xE1vel."
|
|
47
46
|
})
|
|
48
47
|
], RefreshToken.prototype, "revokedAt", 2);
|
|
49
|
-
__decorateClass([
|
|
50
|
-
Column({
|
|
51
|
-
type: "varchar",
|
|
52
|
-
length: 255,
|
|
53
|
-
unique: true,
|
|
54
|
-
comment: "Token de atualiza\xE7\xE3o propriamente dito, utilizado para renovar a sess\xE3o."
|
|
55
|
-
})
|
|
56
|
-
], RefreshToken.prototype, "token", 2);
|
|
57
48
|
__decorateClass([
|
|
58
49
|
Column({
|
|
59
50
|
name: "token_hash",
|
|
60
51
|
type: "char",
|
|
61
52
|
length: 64,
|
|
62
|
-
nullable: true,
|
|
63
53
|
comment: "Hash do refresh token para lookup e valida\xE7\xE3o sem armazenar o token em claro."
|
|
64
54
|
})
|
|
65
55
|
], RefreshToken.prototype, "tokenHash", 2);
|
|
@@ -100,10 +90,8 @@ __decorateClass([
|
|
|
100
90
|
], RefreshToken.prototype, "user", 2);
|
|
101
91
|
RefreshToken = __decorateClass([
|
|
102
92
|
Entity("refresh_tokens"),
|
|
103
|
-
Unique(["token"]),
|
|
104
93
|
Index("UQ_refresh_tokens_token_hash", ["tokenHash"], {
|
|
105
|
-
unique: true
|
|
106
|
-
where: '"token_hash" IS NOT NULL'
|
|
94
|
+
unique: true
|
|
107
95
|
}),
|
|
108
96
|
Index("IDX_refresh_tokens_user_id_revoked_at", ["userId", "revokedAt"])
|
|
109
97
|
], RefreshToken);
|