add jwt module and revokedBearers entry in Account model
parent
891e77a43f
commit
d807d6bdfc
|
@ -21,6 +21,7 @@
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"helmet": "^3.21.2",
|
"helmet": "^3.21.2",
|
||||||
"ioredis": "^4.14.1",
|
"ioredis": "^4.14.1",
|
||||||
|
"jsonwebtoken": "^8.5.1",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"moment-precise-range-plugin": "^1.3.0",
|
"moment-precise-range-plugin": "^1.3.0",
|
||||||
"mongoose": "^5.7.4",
|
"mongoose": "^5.7.4",
|
||||||
|
@ -34,6 +35,7 @@
|
||||||
"@types/fs-extra": "^8.0.0",
|
"@types/fs-extra": "^8.0.0",
|
||||||
"@types/helmet": "^0.0.45",
|
"@types/helmet": "^0.0.45",
|
||||||
"@types/ioredis": "^4.0.18",
|
"@types/ioredis": "^4.0.18",
|
||||||
|
"@types/jsonwebtoken": "^8.5.0",
|
||||||
"@types/mongoose": "^5.7.14",
|
"@types/mongoose": "^5.7.14",
|
||||||
"@types/nodemailer": "^6.2.1",
|
"@types/nodemailer": "^6.2.1",
|
||||||
"@types/signale": "^1.2.1",
|
"@types/signale": "^1.2.1",
|
||||||
|
@ -43,6 +45,7 @@
|
||||||
"eslint": "^6.5.1",
|
"eslint": "^6.5.1",
|
||||||
"eslint-config-airbnb-base": "^14.0.0",
|
"eslint-config-airbnb-base": "^14.0.0",
|
||||||
"eslint-plugin-import": "^2.18.2",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
|
"madge": "^3.9.2",
|
||||||
"typescript": "^3.6.4"
|
"typescript": "^3.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ export interface AccountInterface extends Document {
|
||||||
hash: boolean,
|
hash: boolean,
|
||||||
salt: string,
|
salt: string,
|
||||||
authTag: Buffer
|
authTag: Buffer
|
||||||
|
revokedBearers: string[],
|
||||||
}
|
}
|
||||||
|
|
||||||
const Account = new Schema<AccountInterface>({
|
const Account = new Schema<AccountInterface>({
|
||||||
|
@ -42,6 +43,7 @@ const Account = new Schema<AccountInterface>({
|
||||||
hash: Boolean,
|
hash: Boolean,
|
||||||
salt: String,
|
salt: String,
|
||||||
authTag: Buffer,
|
authTag: Buffer,
|
||||||
|
revokedBearers: Array,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default model<AccountInterface>('Account', Account);
|
export default model<AccountInterface>('Account', Account);
|
||||||
|
|
Loading…
Reference in New Issue