Class AccountAdminData
An account as an operator needs to see it.
public sealed class AccountAdminData
- Inheritance
-
AccountAdminData
- Inherited Members
Remarks
This type must never carry Salt, Verifier, TotpSecret,
VerifyCode or DiscordLinkCode. AccountData carries all of
them because the login path is the one caller that needs them: SRP cannot verify a
password without the salt and the verifier, and the TOTP check cannot run without the
secret. An operator view that carried the same fields would put every account's password
material — and every account's second factor — behind nothing but an access-level check,
on a surface that is read by a panel, serialized to JSON, and logged. The whole point of
SRP is that the verifier never leaves the authentication path; a stolen verifier is an
offline dictionary attack against that account with no further access needed, and a
stolen TOTP secret makes the second factor forgeable forever.
That is precisely why this is a separate type and not a projection, a subset view, or a
nullable-ed copy of AccountData. A projection is one careless
MapEntityToDto edit away from leaking, and the leak would be invisible at the call
site. A type that has no such field cannot leak it, and a future field added to
AccountData does not silently appear here.
TotpEnabled and TotpVerifiedAt are safe and are deliberately kept: an operator answering "why can this person not sign in" needs to know whether a second factor is in the way, and neither field helps forge a code.
Properties
AccessLevel
Account access level. Zero is AccessLevel.Banned, so this doubles as the
ban flag — there is no separate banned column.
public byte AccessLevel { get; set; }
Property Value
Address
Postal address, as they gave it.
public string? Address { get; set; }
Property Value
Remarks
Personal data, like RealName.
Age
Account holder age, or zero when never supplied.
public int Age { get; set; }
Property Value
BanReason
The reason recorded with the ban.
public string? BanReason { get; set; }
Property Value
BannedBy
Operator account that applied the ban, when recorded.
public string? BannedBy { get; set; }
Property Value
BannedUntil
When a temporary ban lifts (UTC); null for a permanent ban, or for no ban.
public DateTime? BannedUntil { get; set; }
Property Value
CharacterCount
How many non-deleted characters the account owns.
public int CharacterCount { get; set; }
Property Value
Remarks
Soft-deleted characters are excluded because the count exists to answer "is this a real, played account", and a row an operator already deleted is not evidence of that.
Country
Country or region, as they gave it.
public string? Country { get; set; }
Property Value
Created
When the account was created (UTC).
public DateTime Created { get; set; }
Property Value
DiscordDmClaimedAt
When the bot took the DM to send it, or null. Set with no sent time means it never confirmed.
public DateTime? DiscordDmClaimedAt { get; set; }
Property Value
DiscordDmLastError
Why the DM has not gone out yet, as the bot last recorded it, or null.
public string? DiscordDmLastError { get; set; }
Property Value
DiscordDmSentAt
When the one verification DM was delivered, or null.
public DateTime? DiscordDmSentAt { get; set; }
Property Value
DiscordUserId
The Discord user the account is linked to, or null.
public long? DiscordUserId { get; set; }
Property Value
- long?
DiscordUsername
The Discord username the player gave, lowercase, or null.
public string? DiscordUsername { get; set; }
Property Value
DiscordVerified
Whether the Discord channel has been proven.
public bool DiscordVerified { get; set; }
Property Value
Contact email, or null when the account has none.
public string? Email { get; set; }
Property Value
EmailVerified
Whether the email address has been proven.
public bool EmailVerified { get; set; }
Property Value
LastLogin
When the account last logged in (UTC).
public DateTime LastLogin { get; set; }
Property Value
LoginLockedUntilUtc
Until when password sign-in is refused, or null.
public DateTime? LoginLockedUntilUtc { get; set; }
Property Value
MuteReason
The reason recorded with the mute.
public string? MuteReason { get; set; }
Property Value
Muted
Whether an account-wide chat mute is set. See MutedUntil for whether it still applies.
public bool Muted { get; set; }
Property Value
MutedBy
Operator account that applied the mute.
public string? MutedBy { get; set; }
Property Value
MutedUntil
When the account mute lifts (UTC), or null for no end.
public DateTime? MutedUntil { get; set; }
Property Value
Name
Account name, as the row stores it. This is the account's primary key.
public string Name { get; set; }
Property Value
Phone
Phone number in E.164 form, or null.
public string? Phone { get; set; }
Property Value
PhoneVerified
Whether the phone number has been proven by SMS.
public bool PhoneVerified { get; set; }
Property Value
RealName
The account holder's real name, as they gave it.
public string? RealName { get; set; }
Property Value
Remarks
Personal data. Shown to staff for establishing ownership; every staff read is audited.
ReferralAccount
The referring account, as typed at registration.
public string? ReferralAccount { get; set; }
Property Value
TotpEnabled
Whether TOTP two-factor authentication is enabled.
public bool TotpEnabled { get; set; }
Property Value
TotpVerifiedAt
When TOTP setup was first confirmed, or null when it never was.
public DateTime? TotpVerifiedAt { get; set; }
Property Value
Remarks
Null with TotpEnabled true means setup was started and never finished, which is the state an operator is usually looking at when a player reports being locked out.
TwoFactorLockedUntilUtc
Until when the authenticator step is refused, or null.
public DateTime? TwoFactorLockedUntilUtc { get; set; }
Property Value
VerificationChannels
The verification channels the player chose, as AccountVerificationChannels flags.
public byte VerificationChannels { get; set; }
Property Value
VerificationEmailSentAt
When a verification email or text was last delivered, or null.
public DateTime? VerificationEmailSentAt { get; set; }
Property Value
Verified
Whether the contact email has been verified.
public bool Verified { get; set; }
Property Value
VerifyFailedCount
Incorrect verification codes entered since the last correct one.
public int VerifyFailedCount { get; set; }