1
0
Fork 0

add jwt module and revokedBearers entry in Account model

refactor/models
Matthew 2020-06-29 18:08:19 -04:00
parent 891e77a43f
commit d807d6bdfc
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
3 changed files with 670 additions and 10 deletions

View File

@ -21,6 +21,7 @@
"fs-extra": "^8.1.0",
"helmet": "^3.21.2",
"ioredis": "^4.14.1",
"jsonwebtoken": "^8.5.1",
"moment": "^2.24.0",
"moment-precise-range-plugin": "^1.3.0",
"mongoose": "^5.7.4",
@ -34,6 +35,7 @@
"@types/fs-extra": "^8.0.0",
"@types/helmet": "^0.0.45",
"@types/ioredis": "^4.0.18",
"@types/jsonwebtoken": "^8.5.0",
"@types/mongoose": "^5.7.14",
"@types/nodemailer": "^6.2.1",
"@types/signale": "^1.2.1",
@ -43,6 +45,7 @@
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"madge": "^3.9.2",
"typescript": "^3.6.4"
}
}

View File

@ -20,6 +20,7 @@ export interface AccountInterface extends Document {
hash: boolean,
salt: string,
authTag: Buffer
revokedBearers: string[],
}
const Account = new Schema<AccountInterface>({
@ -42,6 +43,7 @@ const Account = new Schema<AccountInterface>({
hash: Boolean,
salt: String,
authTag: Buffer,
revokedBearers: Array,
});
export default model<AccountInterface>('Account', Account);

675
yarn.lock

File diff suppressed because it is too large Load Diff