Method TryCreate
- Namespace
- MailFathom.Domain.Emails.Authentication
- Assembly
- MailFathom.Domain.dll
TryCreate(string?, out TrustedAuthenticationAuthority)
Builds an authority from what a deployment configured.
public static bool TryCreate(string? candidate, out TrustedAuthenticationAuthority authority)
Parameters
candidatestringThe configured authserv-id, or null when the account named none.
authorityTrustedAuthenticationAuthorityThe authority, which is None when the account named none.
Returns
Remarks
Absence and a malformed value are separated rather than merged, because startup has to refuse the second while accepting the first: an account that configured nothing has made a choice, and an account whose value is blank, over-long, or full of whitespace has made a mistake that would otherwise be discovered as mail that never authenticates.