Checks/Aws/Test-CognitoUserPoolClientPreventUserExistenceErrors.ps1

function Test-CognitoUserPoolClientPreventUserExistenceErrors {
    <#
    .SYNOPSIS
        Amazon Cognito user pool client has Prevent User Existence Errors enabled

    .DESCRIPTION
        Amazon Cognito app clients use `PreventUserExistenceErrors` to suppress **user-existence disclosures**, keeping authentication, confirmation, and recovery responses generic rather than indicating whether a username exists.

    .PARAMETER Check
        CIEMCheck object containing check metadata.
    #>

    [CmdletBinding()]
    [OutputType([PSCustomObject[]])]
    param(
        [Parameter(Mandatory)]
        [CIEMCheck]$Check
    )

    $ErrorActionPreference = 'Stop'

    # TODO: Implement check logic based on Prowler check: cognito_user_pool_client_prevent_user_existence_errors

    [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check cognito_user_pool_client_prevent_user_existence_errors for reference.', 'N/A', 'cognito Resources')
}