Table of Contents

Constructor ResolvedUserCredential

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

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

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

public ResolvedUserCredential(Guid Id, UserId User, UserCredentialMethod Method, IReadOnlyList<MailFathomPermission> Permissions, bool Enabled, string? Material, UserEndpointAccess EndpointAccess)

Parameters

Id Guid

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

User UserId

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

Method UserCredentialMethod

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

Permissions IReadOnlyList<MailFathomPermission>

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.

Enabled bool

Whether the credential still authenticates anything.

Material string

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

EndpointAccess UserEndpointAccess

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

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.