TsgcWebSocketServer_HTTPAPIProperties › APIKeyManager

APIKeyManager Property

Optional API-key manager component used to validate incoming API keys before accepting a connection.

Syntax

public TsgcWSAPIKeyManager APIKeyManager { get; set; }

Default Value

nil

Remarks

Assign an external TsgcWSAPIKeyManager component to centralise API key issuance, rotation and validation across multiple server instances. Once assigned, every incoming client must present a valid key in the request (via header or query parameter) or the connection is refused. This property is compiled only when the SGC_APIKEYMANAGER conditional is defined — available on editions that include the API Key Manager add-on. Leave unassigned to disable key-based admission control.

Example


oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.APIKeyManager = oAPIKeyManager;
oServer.Active = true;

Back to Properties