Method Create
- Assembly
- MailFathom.Infrastructure.dll
Create(string, McpClientCertificateRequirement, IEnumerable<ConfiguredSecret>, IEnumerable<string>)
Creates a profile from settings that have already been validated.
public static McpClientCertificateTrustProfile Create(string name, McpClientCertificateRequirement requirement, IEnumerable<ConfiguredSecret> trustAnchors, IEnumerable<string> expectedDnsNames)
Parameters
namestringThe operator-chosen name of the client this profile identifies.
requirementMcpClientCertificateRequirementWhether a request presenting no certificate is refused.
trustAnchorsIEnumerable<ConfiguredSecret>The configured certificate authorities, at least one.
expectedDnsNamesIEnumerable<string>The subject alternative names expected of a presented certificate, at least one.
Returns
- McpClientCertificateTrustProfile
The profile.
Exceptions
- ArgumentNullException
Thrown when
trustAnchorsorexpectedDnsNamesis null.- ArgumentException
Thrown when a value would leave the profile unable to identify a client, which means it was mapped before it was validated.