Table of Contents

Class ResolvedUserCredential

Namespace
MailFathom.Application.Access.Credentials
Assembly
MailFathom.Application.dll

What one presented lookup resolves to while a request is being authenticated.

public sealed record ResolvedUserCredential : IEquatable<ResolvedUserCredential>
Inheritance
ResolvedUserCredential
Implements
Inherited Members

Remarks

This is the one shape that carries stored material out of persistence, and it exists for exactly one caller: the authenticator judging a presented credential. Nothing else reads it and nothing composed for an operator is derived from it — UserCredential is what an administrative answer is written from, and the split is what keeps a stored record from reaching a response by somebody projecting one shape onto another.

Enabled is carried rather than filtered out by the lookup, because the authenticator must spend the same work on a disabled credential as on an enabled one. A read that returned nothing for a disabled row would let a caller time the difference between a credential that exists and one that has been turned off, which is the distinction one indistinguishable failure path exists to hide.

ToString() is redacted, so no diagnostic, log template, or exception message can print the stored material by rendering the record it arrived in.

Constructors

ResolvedUserCredential(Guid, UserId, UserCredentialMethod, IReadOnlyList<MailFathomPermission>, bool, string?, UserEndpointAccess)

What one presented lookup resolves to while a request is being authenticated.

Properties

Enabled

Whether the credential still authenticates anything.

EndpointAccess

Which endpoints the credential's user may be served on, read in the same statement that resolved the credential.

Id

The credential's stable identifier, which is what a successful request is recorded under.

Material

The stored record the presented credential is judged against, or null for a method whose lookup is the whole of what is kept.

Method

How the credential is presented, which decides what Material holds.

Permissions

The names a request this credential admits is kept to, in the published order — every name this build publishes where the credential names none, so its user's grant alone decides.

Reach

Gets where the credential may be presented, which the surface judging the request asks of it.

User

The user the request will act for once the credential is judged.

Methods

ToString()

Returns a string that represents the current object.