Table of Contents

Enum UserPasswordRejection

Namespace
MailFathom.Infrastructure.Security.Passwords
Assembly
MailFathom.Infrastructure.dll

Why a presented username-and-password credential was refused.

public enum UserPasswordRejection

Fields

CredentialMalformed = 1

The header was present but is not a Basic credential this endpoint could read.

CredentialMissing = 0

The request carried no Authorization header at all.

CredentialUnrecognized = 3

A readable credential was presented that resolves nothing, matches no password, or names a credential that has been turned off.

The four cases the acceptance criteria name collapse into this one deliberately: they are refused along one path, at the same cost, and telling them apart is exactly what an attacker enumerating accounts is trying to do.

TooManyAttempts = 4

The source or the username has spent its attempts for the current period, so no password was checked.

UsernameUnusable = 2

A readable credential was presented whose user-id is not a username this deployment could have issued.

Remarks

Every value produces the same response, so this vocabulary exists for the server log and never for the caller. A client that learned the difference between an unknown username and a wrong password would learn that an account exists, which is one bit more than a refusal is allowed to say — and a client that learned it had been rate-limited would learn how to pace its guessing.