in projects/event-lambdas/src/event-api-lambda/index.ts [24:51]
async function initialise(): Promise<AppConfig> {
console.log("Running initialisation phase");
// Get valid secrets for the HMAC key
const validSecrets = await getValidSecrets(hmacSecretLocation);
const hmacSecrets = validSecrets.reduce(
(acc, curr) => (curr.value ? acc.concat([curr.value]) : acc),
[] as string[]
);
const pandaHmacAuthentication = new PandaHmacAuthentication(
hmacAllowedDateOffsetInMillis,
hmacSecrets
);
const panDomainAuthentication = new PanDomainAuthentication(
"gutoolsAuth-assym", // cookie name
"eu-west-1", // AWS region
"pan-domain-auth-settings", // Settings bucket
pandaSettingsKey, // Settings file
guardianValidation
);
return {
pandaHmacAuthentication,
panDomainAuthentication,
};
}