Table of Contents

Class VerificationResendThrottle

Namespace
FishMMO.ControlPanel.Services
Assembly
FishMMO-ControlPanel.dll

The per-account cooldown on verification code resends.

public sealed class VerificationResendThrottle
Inheritance
VerificationResendThrottle
Inherited Members

Remarks

The resend endpoint's rate limit is per IP; this one is per account and channel, so the endpoint cannot be driven from a spread of addresses to flood one person's inbox or phone. In memory, because a restart forgetting it costs at most one extra message.

Fields

Cooldown

How long after one code another may be sent for the same account and channel.

public static readonly TimeSpan Cooldown

Field Value

TimeSpan

Methods

TryAcquire(string, AccountVerificationChannels)

True, and the cooldown starts, when a message may be sent now.

public bool TryAcquire(string username, AccountVerificationChannels channel)

Parameters

username string
channel AccountVerificationChannels

Returns

bool