ActiveLogin / ActiveLogin.Authentication

Support Swedish BankID (svenskt BankID) authentication in .NET. Unofficial package, not created by BankID.
https://activelogin.net
MIT License
216 stars 75 forks source link

Pass serviceprovider when configuring certificates #468

Open wootapa opened 2 weeks ago

wootapa commented 2 weeks ago

It would help if you could pass the serviceprovider when calling configureClientCertificate here: https://github.com/ActiveLogin/ActiveLogin.Authentication/blob/aafc9ce5123cca7331a2064938c824aa31513f2f/src/ActiveLogin.Authentication.BankId.Core/IBankIdBuilderExtensions.cs#L40-L51

We can then resolve our own services to provide a certificate


opts.UseClientCertificate(sp =>
{
    var file = await sp.GetRequiredService<MyService>().GetFile("path");
    return new X509Certificate2(file, "password");
});