Skip to content

Commit fe4659e

Browse files
Elin FokineElin Fokine
authored andcommitted
Added documentation about overriding X509KeyStorageFlags when loading client certificate from key vault.
1 parent bbad017 commit fe4659e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/articles/bankid.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,19 @@ services.AddBankId(bankId =>
530530
});
531531
```
532532

533+
By default, `X509KeyStorageFlags.DefaultKeySet` is used when loding the client Certificate from Azure Key Vault.
534+
535+
If this does not work in your environment, it is possible to override the `X509KeyStorageFlags` used when loading the certificate. This allows you to configure certificate handling in a way that is compatible with your specific hosting or security requirements.
536+
537+
```csharp
538+
services.AddBankId(bankId =>
539+
{
540+
bankId
541+
.UseProductionEnvironment()
542+
.UseClientCertificateFromAzureKeyVault(configuration.GetSection("ActiveLogin:BankId:ClientCertificate"), X509KeyStorageFlags.EphemeralKeySet)
543+
...
544+
});
545+
```
533546

534547
### Using client certificate from custom source
535548

0 commit comments

Comments
 (0)