Skip to content

Commit

Permalink
fix authInfo (#219)
Browse files Browse the repository at this point in the history
* fix authInfo

* fix authInfo

* new release

* Update CHANGELOG.md

* new release

---------

Co-authored-by: Max Gruenfelder <[email protected]>
  • Loading branch information
soccermax and Max Gruenfelder authored Aug 1, 2024
1 parent 1290df6 commit 758633d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 21 additions & 18 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/shared/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 758633d

Please sign in to comment.