Method TryParse
- Namespace
- MailFathom.Domain.Access
- Assembly
- MailFathom.Domain.dll
TryParse(string?, out MailFathomPermission)
Parses an operator-supplied or token-supplied permission name.
public static bool TryParse(string? name, out MailFathomPermission permission)
Parameters
namestringThe written name.
permissionMailFathomPermissionThe parsed permission when the name is published; otherwise the unspecified default.
Returns
Remarks
The comparison is exact and neither trimmed nor case-folded, because the same string has to travel as an OAuth scope token, where a scope is compared byte for byte. Accepting a spelling here that an authorization server would treat as a different scope is how a grant comes to mean one thing in configuration and another in a token.