mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
wip
This commit is contained in:
@@ -4,8 +4,7 @@ const debug = require('debug')('jambonz:speech-utils');
|
||||
const EXPIRY = 3600;
|
||||
|
||||
async function getAwsAuthToken(
|
||||
logger,
|
||||
createHash, retrieveHash,
|
||||
logger, createHash, retrieveHash,
|
||||
awsAccessKeyId, awsSecretAccessKey, awsRegion, roleArn = null) {
|
||||
logger = logger || noopLogger;
|
||||
try {
|
||||
@@ -40,7 +39,6 @@ async function getAwsAuthToken(
|
||||
sessionToken: data.Credentials.SessionToken
|
||||
};
|
||||
|
||||
console.log(credentials, 'xquanluu');
|
||||
/* expire 10 minutes before the hour, so we don't lose the use of it during a call */
|
||||
createHash(key, credentials, EXPIRY - 600)
|
||||
.catch((err) => logger.error(err, `Error saving hash for key ${key}`));
|
||||
|
||||
Reference in New Issue
Block a user