Class AccountVerificationRules
Which verification codes an account is sent and asked for. One copy, shared by the game's login server and the Control Panel, so the two can never disagree about whether an account is let in.
public static class AccountVerificationRules
- Inheritance
-
AccountVerificationRules
- Inherited Members
Remarks
Any one channel verifies the account. A player may choose email, SMS and a Discord DM
together; a code goes out on each, and whichever is entered first sets verified.
Verification is required when the server switches at least one channel on. A channel the player chose is asked for only when it is switched on and the account can receive it — SMS needs a phone number, Discord a username. When none of the player's choices qualifies, the account falls back to the first channel that does, in the order email, SMS, Discord: every account has an email address, so a player who picked a switched-off channel is still asked for a code rather than let in without one. Only an account that can receive no enabled channel at all is verified without a code, because no code could ever reach it.
Fields
All
Every channel there is.
public const AccountVerificationChannels All = Email | Sms | Discord
Field Value
FailedCodesBeforeTicket
Incorrect codes, since the last correct one, at which a support ticket is opened for the account.
public const int FailedCodesBeforeTicket = 3
Field Value
Remarks
The ticket is opened when the count reaches this number exactly, so one run of failures opens one ticket however long it continues.
Methods
Effective(AccountVerificationChannels, AccountVerificationChannels, AccountVerificationChannels)
The channels a code is sent on and asked for. None means the account is not asked for a code.
public static AccountVerificationChannels Effective(AccountVerificationChannels chosen, AccountVerificationChannels enabled, AccountVerificationChannels receivable)
Parameters
chosenAccountVerificationChannelsWhat the player chose.
enabledAccountVerificationChannelsWhat this server has switched on.
receivableAccountVerificationChannelsWhat the account can receive; see Receivable(string?, string?, string?).
Returns
IsWaived(in AccountData, AccountVerificationChannels)
True when an unverified account must be let in without a code: the server verifies at least one channel, and none of them can reach this account.
public static bool IsWaived(in AccountData account, AccountVerificationChannels enabled)
Parameters
accountAccountDataenabledAccountVerificationChannels
Returns
Outstanding(in AccountData, AccountVerificationChannels)
The channels an account is still asked for a code on. None for a verified account, and for one that no enabled channel can reach.
public static AccountVerificationChannels Outstanding(in AccountData account, AccountVerificationChannels enabled)
Parameters
accountAccountDataenabledAccountVerificationChannels
Returns
Receivable(string?, string?, string?)
The channels an account could be sent a code on, from what it holds.
public static AccountVerificationChannels Receivable(string? email, string? phone, string? discordUsername)