aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 992 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserPoolIdentityProviderBase=void 0;var core_1=()=>{var tmp=require("../../../../core");return core_1=()=>tmp,tmp},attr_names_1=()=>{var tmp=require("../../private/attr-names");return attr_names_1=()=>tmp,tmp};class UserPoolIdentityProviderBase extends core_1().Resource{constructor(scope,id,props){super(scope,id),this.props=props,props.userPool.registerIdentityProvider(this)}configureAttributeMapping(){if(!this.props.attributeMapping)return;let mapping={};if(mapping=Object.entries(this.props.attributeMapping).filter(([k,_])=>k!=="custom").reduce((agg,[k,v])=>({...agg,[attr_names_1().StandardAttributeNames[k]]:v.attributeName}),mapping),this.props.attributeMapping.custom&&(mapping=Object.entries(this.props.attributeMapping.custom).reduce((agg,[k,v])=>({...agg,[k]:v.attributeName}),mapping)),Object.keys(mapping).length!==0)return mapping}}exports.UserPoolIdentityProviderBase=UserPoolIdentityProviderBase;
;