Table of Contents

Struct AccountData

Namespace
FishMMO.Database.Data
Assembly
FishMMO-DB.dll

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

name string
salt string
verifier string
accessLevel byte
email string
age int
totpEnabled bool
totpSecret string
totpVerifiedAt DateTime?
lastTotpWindow long
verified bool
verifyCode int
verifyCodeExpiresUtc DateTime?
verificationEmailSentAt DateTime?
created DateTime
lastLogin DateTime
verificationChannels byte
emailVerified bool
phoneVerified bool
phone string
loginLockedUntilUtc DateTime?
twoFactorLockedUntilUtc DateTime?
phoneVerifyCodeExpiresUtc DateTime?
discordUsername string
discordVerified bool
discordVerifyCodeIssued bool
discordDmSentAt DateTime?

Fields

AccessLevel

Account access level.

public readonly byte AccessLevel

Field Value

byte

Age

Account holder age. Zero if not provided.

public readonly int Age

Field Value

int

Created

Account creation timestamp (UTC).

public readonly DateTime Created

Field Value

DateTime

DiscordDmSentAt

When the verification DM was delivered, or null. Set once; no second DM is ever sent.

public readonly DateTime? DiscordDmSentAt

Field Value

DateTime?

DiscordUsername

The Discord username the player gave, lowercase, or null. Where the one verification DM goes.

public readonly string? DiscordUsername

Field Value

string

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

bool

DiscordVerifyCodeIssued

Whether a Discord code has been issued. A code is issued once and never replaced.

public readonly bool DiscordVerifyCodeIssued

Field Value

bool

Email

Contact email address. Null if not provided.

public readonly string? Email

Field Value

string

EmailVerified

Whether the email channel has been proven.

public readonly bool EmailVerified

Field Value

bool

LastLogin

Last login timestamp (UTC).

public readonly DateTime LastLogin

Field Value

DateTime

LastTotpWindow

Last TOTP time-step window successfully used, for replay attack prevention.

public readonly long LastTotpWindow

Field Value

long

LoginLockedUntilUtc

Until when password sign-in is refused, or null. Shared by every login server and the panel.

public readonly DateTime? LoginLockedUntilUtc

Field Value

DateTime?

Name

Account name (unique identifier).

public readonly string Name

Field Value

string

Phone

Phone number in E.164 form, or null. Where an SMS code is sent.

public readonly string? Phone

Field Value

string

PhoneVerified

Whether the SMS channel has been proven.

public readonly bool PhoneVerified

Field Value

bool

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

DateTime?

Salt

Password salt for SRP authentication.

public readonly string Salt

Field Value

string

TotpEnabled

Whether TOTP two-factor authentication is enabled.

public readonly bool TotpEnabled

Field Value

bool

TotpSecret

Base32-encoded TOTP secret key, encrypted at rest. Null when not set up.

public readonly string? TotpSecret

Field Value

string

TotpVerifiedAt

Timestamp (UTC) of the first successful TOTP verification. Null when setup not confirmed.

public readonly DateTime? TotpVerifiedAt

Field Value

DateTime?

TwoFactorLockedUntilUtc

Until when the authenticator step is refused, or null.

public readonly DateTime? TwoFactorLockedUntilUtc

Field Value

DateTime?

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

byte

VerificationEmailSentAt

UTC timestamp when a verification email or text was last delivered. Null if none has been.

public readonly DateTime? VerificationEmailSentAt

Field Value

DateTime?

Verified

Whether the account is verified: the one flag sign-in reads. Any one proven channel sets it.

public readonly bool Verified

Field Value

bool

Verifier

Password verifier for SRP authentication.

public readonly string Verifier

Field Value

string

VerifyCode

Random verification code sent to the account email. Zero when no verification is pending.

public readonly int VerifyCode

Field Value

int

VerifyCodeExpiresUtc

UTC expiry for the verification code. Null when no verification is pending.

public readonly DateTime? VerifyCodeExpiresUtc

Field Value

DateTime?