Skip to content

Commit 89b1de8

Browse files
authoredNov 28, 2022
Merge pull request #339 from christianliebel/patch-1
Update for express-jwt@7
2 parents b9e6989 + d619664 commit 89b1de8

File tree

6 files changed

+1284
-8
lines changed

6 files changed

+1284
-8
lines changed
 

‎examples/express-demo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `jwks-rsa` library provides a small helper that makes it easy to configure `
44

55
```js
66
const Express = require('express');
7-
const jwt = require('express-jwt');
7+
const { expressjwt: jwt } = require('express-jwt');
88
const jwksRsa = require('jwks-rsa');
99

1010
...

‎examples/express-demo/package-lock.json

+1,276
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/express-demo/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "express-demo",
33
"version": "1.0.0",
4-
"description": "Sample that shows how tu use jwks-rsa with Express",
4+
"description": "Sample that shows how to use jwks-rsa with Express",
55
"main": "server.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
@@ -18,6 +18,6 @@
1818
"dependencies": {
1919
"debug": "^2.6.9",
2020
"express": "^4.17.0",
21-
"express-jwt": "^6.0.0"
21+
"express-jwt": "^7.0.0"
2222
}
2323
}

‎examples/express-demo/server.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Express = require('express');
2-
const jwt = require('express-jwt');
2+
const { expressjwt: jwt } = require('express-jwt');
33
const logger = require('debug')('express');
4-
const jwksRsa = require('../../src');
4+
const { expressJwtSecret } = require('../../src');
55

66
const jwksHost = process.env.JWKS_HOST;
77
const audience = process.env.AUDIENCE;
@@ -10,7 +10,7 @@ const issuer = process.env.ISSUER;
1010
// Initialize the app.
1111
const app = new Express();
1212
app.use(jwt({
13-
secret: jwksRsa.expressJwtSecret({
13+
secret: expressJwtSecret({
1414
cache: true,
1515
rateLimit: true,
1616
jwksRequestsPerMinute: 2,

‎examples/hapi-demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hapi-demo",
33
"version": "1.0.0",
4-
"description": "Sample that shows how tu use jwks-rsa with Hapi",
4+
"description": "Sample that shows how to use jwks-rsa with Hapi",
55
"main": "server.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"

‎examples/koa-demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "koa-demo",
33
"version": "1.0.0",
4-
"description": "Sample that shows how tu use jwks-rsa with Koa",
4+
"description": "Sample that shows how to use jwks-rsa with Koa",
55
"main": "server.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"

0 commit comments

Comments
 (0)
Please sign in to comment.