bump 0.5.32 — remove audience check from JWT verify

This commit is contained in:
2026-06-09 22:17:23 +04:00
parent 4a45546b0d
commit 9fc3665292
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ipwhitelist",
"version": "0.5.31",
"version": "0.5.32",
"description": "IP WhiteList microservice for cloud provider",
"main": "server.js",
"scripts": {
+1 -2
View File
@@ -241,9 +241,8 @@ function verifyOidcToken(token) {
const pem = crypto.createPublicKey({ key, format: 'jwk' }).export({ type: 'spki', format: 'pem' });
// Проверяем issuer — защита от токенов других realm.
// audience проверяем только если задан KC_CLIENT_ID (для OIDC-режима).
// audience не проверяем — не все KC-клиенты корректно выставляют aud claim.
const opts = { algorithms: ['RS256'], issuer: KC_BASE_URL };
if (KC_CLIENT_ID) opts.audience = KC_CLIENT_ID;
return jwt.verify(token, pem, opts);
}