mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
update getAwsAuthToken use parameters in an object (#784)
* update getAwsAuthToken use parameters in an object * wip * update speech utils
This commit is contained in:
@@ -196,8 +196,12 @@ class SttTask extends Task {
|
|||||||
credentials = {...credentials, access_token, stt_region};
|
credentials = {...credentials, access_token, stt_region};
|
||||||
} else if (['aws', 'polly'].includes(vendor) && credentials.roleArn) {
|
} else if (['aws', 'polly'].includes(vendor) && credentials.roleArn) {
|
||||||
/* get aws access token */
|
/* get aws access token */
|
||||||
const {roleArn} = credentials;
|
const {roleArn, region} = credentials;
|
||||||
const {accessKeyId, secretAccessKey, sessionToken, servedFromCache} = await getAwsAuthToken(roleArn);
|
const {accessKeyId, secretAccessKey, sessionToken, servedFromCache} =
|
||||||
|
await getAwsAuthToken({
|
||||||
|
region,
|
||||||
|
roleArn
|
||||||
|
});
|
||||||
this.logger.debug({roleArn}, `got aws access token ${servedFromCache ? 'from cache' : ''}`);
|
this.logger.debug({roleArn}, `got aws access token ${servedFromCache ? 'from cache' : ''}`);
|
||||||
credentials = {...credentials, accessKeyId, secretAccessKey, sessionToken};
|
credentials = {...credentials, accessKeyId, secretAccessKey, sessionToken};
|
||||||
} else if (vendor === 'verbio' && credentials.client_id && credentials.client_secret) {
|
} else if (vendor === 'verbio' && credentials.client_id && credentials.client_secret) {
|
||||||
|
|||||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -15,7 +15,7 @@
|
|||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/mw-registrar": "^0.2.7",
|
"@jambonz/mw-registrar": "^0.2.7",
|
||||||
"@jambonz/realtimedb-helpers": "^0.8.8",
|
"@jambonz/realtimedb-helpers": "^0.8.8",
|
||||||
"@jambonz/speech-utils": "^0.1.7",
|
"@jambonz/speech-utils": "^0.1.11",
|
||||||
"@jambonz/stats-collector": "^0.1.10",
|
"@jambonz/stats-collector": "^0.1.10",
|
||||||
"@jambonz/time-series": "^0.2.8",
|
"@jambonz/time-series": "^0.2.8",
|
||||||
"@jambonz/verb-specifications": "^0.0.72",
|
"@jambonz/verb-specifications": "^0.0.72",
|
||||||
@@ -2322,9 +2322,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jambonz/speech-utils": {
|
"node_modules/@jambonz/speech-utils": {
|
||||||
"version": "0.1.9",
|
"version": "0.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.1.11.tgz",
|
||||||
"integrity": "sha512-9YIv8i5fyYtzUiAc637DhzOggPeOcolP9VRswc9Gwodux3ORKh7mSMsTwy/HxS81PFoev3FCyzzWuToer0NF1w==",
|
"integrity": "sha512-VgljBLUF871adib/3yWpzd7kv26ioxiLVkAIxm94CSk9WeZuzX1lVcE2SohojW3mjCYdYY6+B8FRyzlTD+en3g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-polly": "^3.496.0",
|
"@aws-sdk/client-polly": "^3.496.0",
|
||||||
"@aws-sdk/client-sts": "^3.496.0",
|
"@aws-sdk/client-sts": "^3.496.0",
|
||||||
@@ -11954,9 +11954,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jambonz/speech-utils": {
|
"@jambonz/speech-utils": {
|
||||||
"version": "0.1.9",
|
"version": "0.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.1.11.tgz",
|
||||||
"integrity": "sha512-9YIv8i5fyYtzUiAc637DhzOggPeOcolP9VRswc9Gwodux3ORKh7mSMsTwy/HxS81PFoev3FCyzzWuToer0NF1w==",
|
"integrity": "sha512-VgljBLUF871adib/3yWpzd7kv26ioxiLVkAIxm94CSk9WeZuzX1lVcE2SohojW3mjCYdYY6+B8FRyzlTD+en3g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@aws-sdk/client-polly": "^3.496.0",
|
"@aws-sdk/client-polly": "^3.496.0",
|
||||||
"@aws-sdk/client-sts": "^3.496.0",
|
"@aws-sdk/client-sts": "^3.496.0",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/mw-registrar": "^0.2.7",
|
"@jambonz/mw-registrar": "^0.2.7",
|
||||||
"@jambonz/realtimedb-helpers": "^0.8.8",
|
"@jambonz/realtimedb-helpers": "^0.8.8",
|
||||||
"@jambonz/speech-utils": "^0.1.7",
|
"@jambonz/speech-utils": "^0.1.11",
|
||||||
"@jambonz/stats-collector": "^0.1.10",
|
"@jambonz/stats-collector": "^0.1.10",
|
||||||
"@jambonz/time-series": "^0.2.8",
|
"@jambonz/time-series": "^0.2.8",
|
||||||
"@jambonz/verb-specifications": "^0.0.72",
|
"@jambonz/verb-specifications": "^0.0.72",
|
||||||
|
|||||||
Reference in New Issue
Block a user