From 758633d2988c2a3719512cd79ed8309784ac658a Mon Sep 17 00:00:00 2001 From: Max Gruenfelder Date: Thu, 1 Aug 2024 10:41:33 +0200 Subject: [PATCH] fix authInfo (#219) * fix authInfo * fix authInfo * new release * Update CHANGELOG.md * new release --------- Co-authored-by: Max Gruenfelder --- CHANGELOG.md | 6 ++++++ package-lock.json | 39 +++++++++++++++++++++------------------ package.json | 2 +- src/shared/common.js | 2 +- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6d24a..5141d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v1.6.2 - 2024-08-31 + +### Fixed + +- pass correct tenant to fetch authInfo + ## v1.6.1 - 2024-07-30 ### Changed diff --git a/package-lock.json b/package-lock.json index 6a35034..8d08b5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cap-js-community/event-queue", - "version": "1.6.1", + "version": "1.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cap-js-community/event-queue", - "version": "1.6.1", + "version": "1.6.2", "license": "Apache-2.0", "dependencies": { "@sap/xssec": "^4.2.1", @@ -330,10 +330,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz", - "integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==", + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", + "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.2" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -533,14 +536,14 @@ } }, "node_modules/@babel/traverse": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.2.tgz", - "integrity": "sha512-s4/r+a7xTnny2O6FcZzqgT6nE4/GHEdcqj4qAeglbUOh0TeglEfmNJFAd/OLoVtGd6ZhAO8GCVvCNUO5t/VJVQ==", + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz", + "integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.25.0", - "@babel/parser": "^7.25.0", + "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/types": "^7.25.2", "debug": "^4.3.1", @@ -4396,9 +4399,9 @@ } }, "node_modules/@types/node": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.0.tgz", - "integrity": "sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw==", + "version": "22.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", + "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", "dev": true, "dependencies": { "undici-types": "~6.11.1" @@ -5193,9 +5196,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001644", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001644.tgz", - "integrity": "sha512-YGvlOZB4QhZuiis+ETS0VXR+MExbFf4fZYYeMTEE0aTQd/RdIjkTyZjLrbYVKnHzppDvnOhritRVv+i7Go6mHw==", + "version": "1.0.30001646", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001646.tgz", + "integrity": "sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==", "dev": true, "funding": [ { @@ -5599,9 +5602,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.3.tgz", - "integrity": "sha512-QNdYSS5i8D9axWp/6XIezRObRHqaav/ur9z1VzCDUCH1XIFOr9WQk5xmgunhsTpjjgDy3oLxO/WMOVZlpUQrlA==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz", + "integrity": "sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index ac28515..9eaf530 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cap-js-community/event-queue", - "version": "1.6.1", + "version": "1.6.2", "description": "An event queue that enables secure transactional processing of asynchronous and periodic events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.", "main": "src/index.js", "types": "src/index.d.ts", diff --git a/src/shared/common.js b/src/shared/common.js index e6fc3f9..95750d5 100644 --- a/src/shared/common.js +++ b/src/shared/common.js @@ -76,7 +76,7 @@ const _getNewAuthInfo = async (tenantId) => { _getNewAuthInfo._xsuaaService = new xssec.XsuaaService(cds.requires.auth.credentials); } const authService = _getNewAuthInfo._xsuaaService; - const token = await authService.fetchClientCredentialsToken(); + const token = await authService.fetchClientCredentialsToken({ zid: tenantId }); const authInfo = await authService.createSecurityContext(token.access_token); authInfoCache[tenantId].expireTs = authInfo.getExpirationDate().getTime() - MARGIN_AUTH_INFO_EXPIRY; return authInfo;