Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
1.2 KiB
Text
22 lines
1.2 KiB
Text
import { getDefaultRoleAssumer as StsGetDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity as StsGetDefaultRoleAssumerWithWebIdentity, } from "./defaultStsRoleAssumers";
|
|
import { STSClient } from "./STSClient";
|
|
const getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
if (!customizations)
|
|
return baseCtor;
|
|
else
|
|
return class CustomizableSTSClient extends baseCtor {
|
|
constructor(config) {
|
|
super(config);
|
|
for (const customization of customizations) {
|
|
this.middlewareStack.use(customization);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
export const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
export const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
export const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
roleAssumer: getDefaultRoleAssumer(input),
|
|
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
|
|
...input,
|
|
});
|