Table of Contents

Class NetworkAuthModule

Namespace
Shard.Network.Auth
Assembly
Shard.Network.Auth.dll

The authentication module provides the IConnectionHandlerFactory when it starts, while its preload completes OAuth and game session authentication before the server becomes ready and networking is enabled. Quiescence rejects new handshake work, cancels and drains active work, and then releases the server session slot.

public sealed class NetworkAuthModule : BaseModule, IModule
Inheritance
NetworkAuthModule
Implements
Inherited Members

Constructors

NetworkAuthModule(AuthConfig, AuthMode, PlayerJoinAdmission)

The authentication module provides the IConnectionHandlerFactory when it starts, while its preload completes OAuth and game session authentication before the server becomes ready and networking is enabled. Quiescence rejects new handshake work, cancels and drains active work, and then releases the server session slot.

public NetworkAuthModule(AuthConfig authConfig, AuthMode mode, PlayerJoinAdmission playerJoin)

Parameters

authConfig AuthConfig
mode AuthMode
playerJoin PlayerJoinAdmission

Properties

Manifest

Gets the module's identity and dependency declaration.

public override ModuleManifest Manifest { get; }

Property Value

ModuleManifest

Methods

OnPreloadAsync(CancellationToken)

Performs asynchronous preload work that must complete before this module can start.

protected override Task OnPreloadAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that is canceled when server startup is interrupted.

Returns

Task

A task representing the asynchronous preload operation.

OnQuiesceAsync()

Stops new work and completes work already accepted by the module.

protected override Task OnQuiesceAsync()

Returns

Task

OnSetup()

Called during synchronous module setup after the module context has been assigned.

protected override void OnSetup()

OnShutdown()

Called in reverse load order after quiescence. This hook is skipped if setup does not complete; use IDisposable for cleanup required on every ownership path.

protected override void OnShutdown()

OnStart()

Called after preload and required dependencies start. The ready event is published after all eligible start hooks and failed or blocked module cleanup finish.

protected override void OnStart()