@Override
    protected IndirectClient getClient() {
        val configuration = new OidcConfiguration();
        configuration.setClientId("test");
        configuration.setSecret("secret");
        configuration.setDiscoveryURI("http://localhost:1941/.well-known/openid-configuration");
        if (flow == Flow.IMPLICIT_FLOW) {
            // AllowedGrantTypes = GrantTypes.ImplicitAndClientCredentials,
            configuration.setResponseType("id_token");
            configuration.setResponseMode("form_post");
            configuration.setUseNonce(true);
            logger.warn("For the implicit flow, copy / paste the form body parameters after a ? as the returned url");
        } else if (flow == Flow.IMPLICIT_FLOW_CLIENT_SIDE) {
            // this flow can not be used in fact (as data ae passed as anchor parameters, only on client side)
            // AllowedGrantTypes = GrantTypes.ImplicitAndClientCredentials,
            configuration.setResponseType("id_token");
            configuration.setUseNonce(true);
        /*} else if (flow == Flow.AUTHORIZATION_CODE) {
            AllowedGrantTypes = GrantTypes.CodeAndClientCredentials,*/
        } else if (flow == Flow.HYBRID_FLOW) {
            // AllowAccessTokensViaBrowser = true, AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
            configuration.setResponseType("code id_token token");
            configuration.setUseNonce(true);
        } else if (flow != Flow.AUTHORIZATION_CODE) {
            throw new TechnicalException("Unsupported flow for tests");
        }
        val client = new OidcClient(configuration);
        client.setCallbackUrl(PAC4J_BASE_URL);
        return client;
    }
Run a manual test for the IdentityServer4 (https://github.com/IdentityServer/IdentityServer4/src/Host)
with the following configuration:

new Client
{
    ClientId = "test",
    ClientSecrets = new List<Secret>
    {
        new Secret("secret".Sha256())
    },
    RedirectUris = new List<string>
    {
        "http://www.pac4j.org/"
    },
    AllowedGrantTypes = GrantTypes.ImplicitAndClientCredentials,
    AllowedScopes = new List<string>
    {
        "openid", "profile", "email"
    }
},

@author Jerome Leleu
@since 1.9.2
pac4j-oidc/src/test/java/org/pac4j/oidc/run/RunIdentityServer4.java