Table of Contents

Struct UserCredentialLogin

Namespace
MailFathom.Domain.Access
Assembly
MailFathom.Domain.dll

What a person types to sign in with a password: a username, prefixed by their organization's short name when they belong to one.

public readonly record struct UserCredentialLogin : IEquatable<UserCredentialLogin>
Implements
Inherited Members

Remarks

A member of an organization signs in as SHORTNAME/username and somebody in no organization as username, so two companies can each have a jan. The login is split at its first /, and each half keeps the fold its own type owns — the short name upper-cased, the username lowercased — so the canonical form is decided once whichever spelling a keyboard produced.

Being a struct, default is reachable and is not a login; it reports itself through IsSpecified.

Fields

OrganizationSeparator

What separates an organization's short name from the username in a login.

Properties

IsSpecified

Gets whether this value names a login rather than the unusable struct default.

Organization

Gets the organization the login is scoped to, or the unspecified default for somebody in no organization.

Username

Gets the username half of the login.

Value

Gets the canonical form, which is what the attempt limiter partitions on and what an operator is shown.

Methods

Compose(OrganizationShortName, UserCredentialUsername)

Composes the login a username is typed as within an organization, or without one.

ToString()

Returns the fully qualified type name of this instance.

TryRead(string?, out UserCredentialLogin)

Reads a typed login into its two canonical halves.