Table of Contents

Use a client certificate

Fluxzy support mutual TLS authentication by specifying a client certificate. The certificate can be load either from a PKCS12 file or from the default store.

using Fluxzy;
using Fluxzy.Certificates;
using Fluxzy.Rules.Actions;
using Fluxzy.Rules.Filters.RequestFilters;

var fluxzySetting = FluxzySetting.CreateDefault();

var certificate = Certificate.LoadFromPkcs12("clientCertificiate.p12", "password");

    new SetClientCertificateAction(certificate),
    new AbsoluteUriFilter(""));

// Create a new proxy instance 
await using var proxy = new Proxy(fluxzySetting);

Console.WriteLine("Press any key to exit");

Certificate can be loaded from a PKCS12 file or from the default store (Certificate.LoadFromUserStoreByThumbprint)