in src/integ_test_resources/ios/sdk/integration/cdk/cdk_integration_tests_ios/core_stack.py [0:0]
def __init__(self, scope: core.Construct, id: str, common_stack: CommonStack, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
self._supported_in_region = self.are_services_supported_in_region(["cognito-identity"])
(self._facebook_app_id, self._facebook_app_secret) = CoreStack.get_facebook_app_config()
supported_login_providers = {"graph.facebook.com": self._facebook_app_id}
(
identity_pool_with_facebook,
identity_pool_auth_role,
identity_pool_unauth_role,
) = construct_identity_pool(
self,
resource_id_prefix="core",
supported_login_providers=supported_login_providers,
developer_provider_name="iostests.com",
)
(unauth_identity_pool, _, _) = construct_identity_pool(
self,
resource_id_prefix="core2",
auth_role=identity_pool_auth_role,
unauth_role=identity_pool_unauth_role,
)
self._parameters_to_save = {
"identityPoolId": identity_pool_with_facebook.ref,
"unauthIdentityPoolId": unauth_identity_pool.ref,
"authRoleArn": identity_pool_auth_role.role_arn,
"unauthRoleArn": identity_pool_unauth_role.role_arn,
"facebookAppId": self._facebook_app_id,
"facebookAppSecret": self._facebook_app_secret,
}
self.create_wic_provider_test_role()
stack_policy = aws_iam.PolicyStatement(
effect=aws_iam.Effect.ALLOW, actions=["cognito-identity:*"], resources=["*"]
)
common_stack.add_to_common_role_policies(self, policy_to_add=stack_policy)
self.save_parameters_in_parameter_store(platform=Platform.IOS)