Table of Contents

Enum AuthState

Namespace
FishMMO.Auth.Core
Assembly
FishMMO-AuthShared.dll

Unified authentication state for all server types. Replaces the former SrpState enum and implicit in-flight flags with a single atomic enum that tracks the full connection lifecycle.

public enum AuthState : byte

Fields

Authenticated = 7

Fully authenticated. Terminal state.

Handshake = 1

Handshake received. Encryption keys established. Next: VerifyPending (SRP) or TokenPending (token).

None = 0

No authentication state. Connection exists but handshake has not completed.

ProofPending = 4

SRP proof request enqueued for async worker processing.

SrpSuccess = 5

SRP proof validated, login in progress.

TokenPending = 6

Token auth request enqueued for async worker processing.

VerifyPending = 2

SRP verify request enqueued for async worker processing.

WaitingForProof = 3

SRP verify completed, SRP data established. Waiting for client proof.

Remarks

State machine:

SRP flow:   None → Handshake → VerifyPending → WaitingForProof → ProofPending → SrpSuccess → Authenticated
Token flow: None → Handshake → TokenPending → Authenticated

All transitions are performed atomically via TryAdvanceAuthState under the AccountManager lock. The enum values are intentionally ordered so that state > AuthState.Handshake means "auth is in progress."

DO NOT RENUMBER — sweep logic and guard checks rely on ordinal comparisons.