Skip to content

Commit f96daab

Browse files
committed
Bump remaining direct dependencies
1 parent ffa436f commit f96daab

File tree

4 files changed

+94
-311
lines changed

4 files changed

+94
-311
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@
5555
"dependencies": {
5656
"basic-auth": "^2.0.1",
5757
"cors": "^2.8.5",
58-
"express": "^4.21.2",
58+
"express": "^5.1.0",
5959
"is-plain-object": "^5.0.0",
6060
"jose": "^5.10.0"
6161
},
6262
"devDependencies": {
6363
"@eslint/js": "^9.26.0",
6464
"@types/basic-auth": "^1.1.6",
6565
"@types/cors": "^2.8.17",
66-
"@types/express": "^4.17.21",
67-
"@types/node": "^18.19.87",
66+
"@types/express": "^5.0.1",
67+
"@types/node": "^18.19.97",
6868
"@types/supertest": "^6.0.3",
6969
"@typescript-eslint/eslint-plugin": "^8.32.0",
7070
"@typescript-eslint/parser": "^8.32.0",
71-
"@vitest/coverage-v8": "^3.1.2",
71+
"@vitest/coverage-v8": "^3.1.3",
7272
"@vitest/eslint-plugin": "^1.1.44",
7373
"eslint": "^9.26.0",
7474
"eslint-config-prettier": "^10.1.3",
@@ -81,7 +81,7 @@
8181
"supertest": "^7.1.0",
8282
"typescript": "^5.8.3",
8383
"typescript-eslint": "^8.32.0",
84-
"vitest": "^3.1.2"
84+
"vitest": "^3.1.3"
8585
},
8686
"resolutions": {
8787
"@types/node": "^18"

src/lib/oauth2-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class OAuth2Service extends EventEmitter {
137137
private buildRequestHandler = (): RequestListener => {
138138
const app = express();
139139
app.disable('x-powered-by');
140-
app.use(json());
140+
app.use(json({ strict: true }));
141141
app.use(cors());
142142
app.get(this.#endpoints.wellKnownDocument, this.openidConfigurationHandler);
143143
app.get(this.#endpoints.jwks, this.jwksHandler);
@@ -152,7 +152,7 @@ export class OAuth2Service extends EventEmitter {
152152
app.get(this.#endpoints.endSession, this.endSessionHandler);
153153
app.post(this.#endpoints.introspect, this.introspectHandler);
154154

155-
return app;
155+
return app as RequestListener;
156156
};
157157

158158
private openidConfigurationHandler: RequestHandler = (_req, res) => {

test/oauth2-server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('OAuth 2 Server', () => {
5252
.post('/token')
5353
.set('Content-Type', 'multipart/form-data;');
5454

55-
expect(res.text).toContain("[ERR_ASSERTION]: Invalid 'grant_type' type");
55+
expect(res.text).toContain("[ERR_ASSERTION]: Invalid token request body");
5656

5757
await expect(server.stop()).resolves.not.toThrow();
5858
});

0 commit comments

Comments
 (0)