Compare commits

..
2 Commits
Author SHA1 Message Date
Dave Horton 048b7e871e 0.0.30 2023-11-30 16:11:34 -05:00
Dave Horton 4cae96eacb rename aws token from sessionToken to securityToken for consistency with AWS docs 2023-11-30 16:11:23 -05:00
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ async function getAwsAuthToken(
const credentials = {
accessKeyId: data.Credentials.AccessKeyId,
secretAccessKey: data.Credentials.SecretAccessKey,
sessionToken: data.Credentials.SessionToken
securityToken: data.Credentials.SessionToken
};
/* expire 10 minutes before the hour, so we don't lose the use of it during a call */
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@jambonz/speech-utils",
"version": "0.0.29",
"version": "0.0.30",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@jambonz/speech-utils",
"version": "0.0.29",
"version": "0.0.30",
"license": "MIT",
"dependencies": {
"@aws-sdk/client-polly": "^3.359.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@jambonz/speech-utils",
"version": "0.0.29",
"version": "0.0.30",
"description": "TTS-related speech utilities for jambonz",
"main": "index.js",
"author": "Dave Horton",
+2 -2
View File
@@ -21,12 +21,12 @@ test('AWS - create and cache auth token', async(t) => {
try {
let obj = await getAwsAuthToken(process.env.AWS_ACCESS_KEY_ID, process.env.AWS_SECRET_ACCESS_KEY, process.env.AWS_REGION);
//console.log({obj}, 'received auth token from AWS');
t.ok(obj.sessionToken && !obj.servedFromCache, 'successfullY generated auth token from AWS');
t.ok(obj.securityToken && !obj.servedFromCache, 'successfullY generated auth token from AWS');
await sleep(250);
obj = await getAwsAuthToken(process.env.AWS_ACCESS_KEY_ID, process.env.AWS_SECRET_ACCESS_KEY, process.env.AWS_REGION);
//console.log({obj}, 'received auth token from AWS - second request');
t.ok(obj.sessionToken && obj.servedFromCache, 'successfully received access token from cache');
t.ok(obj.securityToken && obj.servedFromCache, 'successfully received access token from cache');
await client.flushall();
t.end();