aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.99 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserPoolAuthenticationProvider=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class UserPoolAuthenticationProvider{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cognito_identitypool.UserPoolAuthenticationProvider",version:"2.233.0"};userPool;userPoolClient;disableServerSideTokenCheck;constructor(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cognito_identitypool_UserPoolAuthenticationProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,UserPoolAuthenticationProvider),error}this.userPool=props.userPool,this.userPoolClient=props.userPoolClient||this.userPool.addClient("UserPoolAuthenticationProviderClient"),this.disableServerSideTokenCheck=props.disableServerSideTokenCheck??!1}bind(scope,identityPool,_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cognito_identitypool_IIdentityPool(identityPool),jsiiDeprecationWarnings().aws_cdk_lib_aws_cognito_identitypool_UserPoolAuthenticationProviderBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}constructs_1().Node.of(identityPool).addDependency(this.userPool),constructs_1().Node.of(identityPool).addDependency(this.userPoolClient);const region=core_1().Stack.of(scope).region,urlSuffix=core_1().Stack.of(scope).urlSuffix;return{clientId:this.userPoolClient.userPoolClientId,providerName:`cognito-idp.${region}.${urlSuffix}/${this.userPool.userPoolId}`,serverSideTokenCheck:!this.disableServerSideTokenCheck}}}exports.UserPoolAuthenticationProvider=UserPoolAuthenticationProvider;