Struct OrganizationShortName
- Namespace
- MailFathom.Domain.Access
- Assembly
- MailFathom.Domain.dll
The short name an organization is signed in under, in the single form the deployment stores and compares.
public readonly record struct OrganizationShortName : IEquatable<OrganizationShortName>
- Implements
- Inherited Members
Remarks
A member of an organization signs in as SHORTNAME/username, so this is the half of a login that says which
company a person belongs to. It is unique across the deployment and folded to upper case on the way in, so the form an
operator stored, the form the unique index holds, and the form a request is resolved by are one form decided here.
The accepted characters are A–Z, 0–9, and -. A / is refused because it is what
separates the short name from the username, and a colon because RFC 7617 separates the login from the password with
the first one; neither is in the set, so neither needs a rule of its own.
Being a struct, default is reachable and is not a short name. It reports itself through IsSpecified, which is also how a login naming no organization is told apart.
Fields
- MaximumLength
The longest short name this deployment accepts, in characters.
Properties
- IsSpecified
Gets whether this value names a short name rather than the unusable struct default.
- Value
Gets the canonical upper-case form, which is what is stored, indexed, and compared.
Methods
- Create(string)
Reads a written short name into its canonical form, refusing anything this deployment does not accept.
- DescribeAcceptedForm()
Describes what a short name may contain, for a refusal an operator reads.
- ToString()
Returns the fully qualified type name of this instance.
- TryCreate(string?, out OrganizationShortName)
Reads a written short name into its canonical form.