Table of Contents

Class TokenAccountManager<TConnection>

Namespace
FishMMO.Auth.Implementation
Assembly
FishMMO-ServerAuth.dll

Token-specific account manager for World and Scene server authentication. Extends AccountManager<TConnection> with a simplified connection account creation method that does not require SRP state.

public class TokenAccountManager<TConnection> : AccountManager<TConnection>, ITokenAccountManager<TConnection>, IAccountManager<TConnection>

Type Parameters

TConnection

The type representing a network connection.

Inheritance
AccountManager<TConnection>
TokenAccountManager<TConnection>
Implements
IAccountManager<TConnection>
Derived
Inherited Members

Constructors

TokenAccountManager(Func<TConnection, string>, string)

Initializes a new TokenAccountManager.

public TokenAccountManager(Func<TConnection, string> getConnectionId, string logPrefix = "TokenAccountManager")

Parameters

getConnectionId Func<TConnection, string>

Delegate that returns a diagnostic identifier for a connection (e.g., client ID).

logPrefix string

Prefix used in diagnostic log messages.

Methods

AddConnectionAccount(TConnection, string, AccessLevel)

Registers account name and access level for a token-authenticated connection. Updates the existing AccountData (created at handshake time) with the resolved access level. The connection is not untracked from the unauthenticated timer here — that happens when Authenticated is reached via TryAdvanceAuthState(TConnection, AuthState, AuthState).

public void AddConnectionAccount(TConnection connection, string accountName, AccessLevel accessLevel)

Parameters

connection TConnection

The network connection.

accountName string

The account name.

accessLevel AccessLevel

The access level for the account.

Exceptions

InvalidOperationException

Thrown when no AccountData exists for the connection, indicating the handshake path was skipped or the connection was purged.