TsgcWebSocketHTTPServer › Properties › APIKeyManager
Optional API-key manager component used to validate incoming API keys before accepting a connection.
public TsgcWSAPIKeyManager APIKeyManager { get; set; }
nil
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.
oServer = new TsgcWebSocketHTTPServer();
oServer.APIKeyManager = oAPIKeyManager;
oServer.Active = true;