Struct AccountData
Account data transfer object.
public struct AccountData
- Inherited Members
Constructors
AccountData(string, string, string, byte, string?, int, bool, string?, DateTime?, long, bool, int, DateTime?, DateTime?, DateTime, DateTime, byte, bool, bool, string?, DateTime?, DateTime?, DateTime?, string?, bool, bool, DateTime?)
Initializes a new instance of the AccountData struct.
public AccountData(string name, string salt, string verifier, byte accessLevel, string? email, int age, bool totpEnabled, string? totpSecret, DateTime? totpVerifiedAt, long lastTotpWindow, bool verified, int verifyCode, DateTime? verifyCodeExpiresUtc, DateTime? verificationEmailSentAt, DateTime created, DateTime lastLogin, byte verificationChannels = 1, bool emailVerified = false, bool phoneVerified = false, string? phone = null, DateTime? loginLockedUntilUtc = null, DateTime? twoFactorLockedUntilUtc = null, DateTime? phoneVerifyCodeExpiresUtc = null, string? discordUsername = null, bool discordVerified = false, bool discordVerifyCodeIssued = false, DateTime? discordDmSentAt = null)
Parameters
namestringsaltstringverifierstringaccessLevelbyteemailstringageinttotpEnabledbooltotpSecretstringtotpVerifiedAtDateTime?lastTotpWindowlongverifiedboolverifyCodeintverifyCodeExpiresUtcDateTime?verificationEmailSentAtDateTime?createdDateTimelastLoginDateTimeverificationChannelsbyteemailVerifiedboolphoneVerifiedboolphonestringloginLockedUntilUtcDateTime?twoFactorLockedUntilUtcDateTime?phoneVerifyCodeExpiresUtcDateTime?discordUsernamestringdiscordVerifiedbooldiscordVerifyCodeIssuedbooldiscordDmSentAtDateTime?
Fields
AccessLevel
Account access level.
public readonly byte AccessLevel
Field Value
Age
Account holder age. Zero if not provided.
public readonly int Age
Field Value
Created
Account creation timestamp (UTC).
public readonly DateTime Created
Field Value
DiscordDmSentAt
When the verification DM was delivered, or null. Set once; no second DM is ever sent.
public readonly DateTime? DiscordDmSentAt
Field Value
DiscordUsername
The Discord username the player gave, lowercase, or null. Where the one verification DM goes.
public readonly string? DiscordUsername
Field Value
DiscordVerified
Whether the Discord channel has been proven (by the DM's code, or by the bot's link).
public readonly bool DiscordVerified
Field Value
DiscordVerifyCodeIssued
Whether a Discord code has been issued. A code is issued once and never replaced.
public readonly bool DiscordVerifyCodeIssued
Field Value
Contact email address. Null if not provided.
public readonly string? Email
Field Value
EmailVerified
Whether the email channel has been proven.
public readonly bool EmailVerified
Field Value
LastLogin
Last login timestamp (UTC).
public readonly DateTime LastLogin
Field Value
LastTotpWindow
Last TOTP time-step window successfully used, for replay attack prevention.
public readonly long LastTotpWindow
Field Value
LoginLockedUntilUtc
Until when password sign-in is refused, or null. Shared by every login server and the panel.
public readonly DateTime? LoginLockedUntilUtc
Field Value
Name
Account name (unique identifier).
public readonly string Name
Field Value
Phone
Phone number in E.164 form, or null. Where an SMS code is sent.
public readonly string? Phone
Field Value
PhoneVerified
Whether the SMS channel has been proven.
public readonly bool PhoneVerified
Field Value
PhoneVerifyCodeExpiresUtc
UTC expiry for the SMS verification code, or null when no SMS code has been issued. The login server reads it to re-send an expired or missing SMS code at sign-in.
public readonly DateTime? PhoneVerifyCodeExpiresUtc
Field Value
Salt
Password salt for SRP authentication.
public readonly string Salt
Field Value
TotpEnabled
Whether TOTP two-factor authentication is enabled.
public readonly bool TotpEnabled
Field Value
TotpSecret
Base32-encoded TOTP secret key, encrypted at rest. Null when not set up.
public readonly string? TotpSecret
Field Value
TotpVerifiedAt
Timestamp (UTC) of the first successful TOTP verification. Null when setup not confirmed.
public readonly DateTime? TotpVerifiedAt
Field Value
TwoFactorLockedUntilUtc
Until when the authenticator step is refused, or null.
public readonly DateTime? TwoFactorLockedUntilUtc
Field Value
VerificationChannels
The verification channels the player chose, as AccountVerificationChannels flags.
Verified is set by the first of them to be proven.
public readonly byte VerificationChannels
Field Value
VerificationEmailSentAt
UTC timestamp when a verification email or text was last delivered. Null if none has been.
public readonly DateTime? VerificationEmailSentAt
Field Value
Verified
Whether the account is verified: the one flag sign-in reads. Any one proven channel sets it.
public readonly bool Verified
Field Value
Verifier
Password verifier for SRP authentication.
public readonly string Verifier
Field Value
VerifyCode
Random verification code sent to the account email. Zero when no verification is pending.
public readonly int VerifyCode
Field Value
VerifyCodeExpiresUtc
UTC expiry for the verification code. Null when no verification is pending.
public readonly DateTime? VerifyCodeExpiresUtc