Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump express-jwt from 6.1.1 to 7.5.0 #690

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"homepage": "https://iasql.com",
"devDependencies": {
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/jest": "^27.5.0",
"@types/node": "^16.11.28",
"@types/uuid": "^8.3.4",
Expand Down Expand Up @@ -64,12 +65,10 @@
"@aws-sdk/util-waiter": "^3.78.0",
"@logdna/logger": "^2.6.5",
"@sentry/node": "^7.3.0",
"@types/express": "^4.17.13",
"@types/express-jwt": "^6.0.2",
"axios": "^0.27.2",
"cors": "^2.8.5",
"express": "^4.18.1",
"express-jwt": "^6.1.0",
"express-jwt": "^7.5.0",
"fastest-levenshtein": "^1.0.12",
"graphile-worker": "^0.13.0",
"jwks-rsa": "^2.1.4",
Expand Down
3 changes: 2 additions & 1 deletion src/router/db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as express from 'express'
import Request from 'express-jwt'
import { IasqlDatabase } from '../entity';

import * as dbMan from '../services/db-manager';
Expand Down Expand Up @@ -62,7 +63,7 @@ db.post('/connect', connectHandler);
}
});*/

db.post('/export', async (req, res) => {
db.post('/export', async (req: Request, res: express.Response) => {
logger.info('Calling /export');
const { dbAlias, dataOnly } = req.body;
if (!dbAlias) return res.status(400).json("Required key 'dbAlias' not provided");
Expand Down
5 changes: 3 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as express from 'express'
import jwt from 'express-jwt'
import { expressjwt as jwt, GetVerificationKey, } from 'express-jwt'
import jwksRsa from 'jwks-rsa'

import config from '../config'
Expand All @@ -14,9 +14,10 @@ v1.use(express.json({ limit: '10000MB' }));
v1.use(express.text({ limit: '10000MB' }));
if (config.auth) {
const checkJwt = jwt({
// TODO: Once @types/express-jwt is updated, remove this type mangling
secret: jwksRsa.expressJwtSecret({
jwksUri: `${config.auth.domain}.well-known/jwks.json`,
}),
}) as GetVerificationKey, // https://github.com/auth0/express-jwt/issues/288
audience: config.auth.audience,
issuer: config.auth.domain,
algorithms: ['RS256'],
Expand Down
59 changes: 23 additions & 36 deletions yarn.lock

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