Dynamically display PropertyConfig in admin UI

Hi

I’m building a custom JPA to fetch user data from an external API.
As is it works good but would like to have some improvement in my admin UI console where everything is static by now.

Here are my props :

    return ProviderConfigurationBuilder.create()
        .property() // API URL
            .name(JpaStorageConstants.API_DOMAIN_URL)
            .label("API Domain URL")
            .type(ProviderConfigProperty.STRING_TYPE)
            .helpText("The URL Domain of the external API used to authenticate suppliers.")
            .required(true)
            .add()
        .property() // API Basic Authentication
            .name(JpaStorageConstants.API_BASIC_AUTHENTICATION)
            .label("API Authentication")
            .type(ProviderConfigProperty.BOOLEAN_TYPE)
            .helpText("Whether the API requires authentication using Basic authentication.")
            .required(true)
            .add()
        .property() // API Basic Authentication
            .name(JpaStorageConstants.API_BASIC_AUTHENTICATION_USERNAME)
            .label("API Authentication Basic Username")
            .type(ProviderConfigProperty.STRING_TYPE)
            .helpText("API Basic authentication username.")
            .add()
        .property() // API Basic Password
            .name(JpaStorageConstants.API_BASIC_AUTHENTICATION_PASSWORD)
            .label("API Authentication Basic Password")
            .type(ProviderConfigProperty.PASSWORD)
            .helpText("API Basic authentication password.")
            .secret(true)
            .add()
        // ... 
        .build();

I would like to do something very simple : only display Basic auth login/password only if API_BASIC_AUTHENTICATION is checked (boolean to true).
Is there an easy way to do this?

Cherry on the cake, to code an “Test Connection” button that checks if everything is okay like in LDAP panel?