Skip to content

Commit

Permalink
Updated uuid for performance improvement (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricSmekens authored Oct 6, 2020
1 parent 835fea6 commit 6146237
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"dependencies": {
"jsonwebtoken": "^8.4.0",
"request": "^2.88.2",
"uuid": "^2.0.2"
"uuid": "^8.3.0"
},
"license": "Apache 2.0"
}
4 changes: 2 additions & 2 deletions src/JwtGenerator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from "uuid";
import { v1 as uuidv1 } from "uuid";
import jwt from "jsonwebtoken";

class JwtGenerator {
Expand All @@ -22,7 +22,7 @@ class JwtGenerator {

var toSign = {
iat: claims.issuedAt || parseInt(Date.now() / 1000, 10),
jti: claims.jti || uuid.v1()
jti: claims.jti || uuidv1()
};
Object.keys(claims).forEach(key => {
toSign[key] = claims[key];
Expand Down

0 comments on commit 6146237

Please sign in to comment.