Class UserPasswordAuthenticationResult
- Namespace
- MailFathom.Infrastructure.Security.Passwords
- Assembly
- MailFathom.Infrastructure.dll
The outcome of judging one presented username-and-password credential.
public sealed record UserPasswordAuthenticationResult : IEquatable<UserPasswordAuthenticationResult>
- Inheritance
-
UserPasswordAuthenticationResult
- Implements
- Inherited Members
Remarks
A refused credential is an expected outcome of serving an open endpoint rather than an exceptional state, so authentication returns this instead of throwing. The successful result carries what every user-facing method establishes and nothing else: the credential's identifier, which an audit record and a diagnostic correlate on, the user the request will act for, what that request may do, and which endpoints that user's switches serve them on. The username is deliberately absent so nothing downstream can write one down.
Properties
- Succeeded
Gets whether the presented credential authenticated.
Methods
- Authenticated(Guid, UserId, IReadOnlyList<MailFathomPermission>, UserEndpointAccess, UserCredentialReach)
Creates a successful result naming the credential that matched and what it admits.
- Rejected(UserPasswordRejection)
Creates a refused result.