Skip to content

Commit

Permalink
fix: credentials store cachedOptions access
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Dec 29, 2023
1 parent 05766b1 commit 027c93c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/credentials-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class CredentialsStore {
}

async getKey(keyId) {
const { tokenGet, cachedOptions: { tokenGet: publishOptions } } = this.config;
const publishOptions = this.cachedOptions.tokenGet;
const { tokenGet } = this.config;
const [username, uuid] = keyId.split('.');
try {
const { raw } = await this.amqp
Expand All @@ -63,7 +64,8 @@ class CredentialsStore {
}

getCredentials(keyId, audience) {
const { apiTokenVerify, cachedOptions: { apiTokenVerify: publishOptions } } = this.config;
const publishOptions = this.cachedOptions.apiTokenVerify;
const { apiTokenVerify } = this.config;
const [username, uuid] = keyId.split('.');

return this.amqp.publishAndWait(apiTokenVerify, { username, uuid, audience }, publishOptions);
Expand Down

0 comments on commit 027c93c

Please sign in to comment.