API Key Manager

TsgcWSAPIKeyManager — full-lifecycle management for the API keys your sgcWebSockets servers issue. Generate, hash, validate, rotate, revoke and audit — all from one drop-on-form component.

TsgcWSAPIKeyManager

API-key validator. Plug it into a TsgcWebSocketHTTPServer (or HTTP-API server) and every incoming connection is checked against your key store via a single event.

Component class

TsgcWSAPIKeyManager

Protocol

Server-side admission control.

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Professional / Enterprise

Drop the component, set a few properties, go

Hook OnAPIKeyAuthenticate, attach to the server, done.

uses
  sgcWebSocket, sgcWebSocket_Server, sgcAPIKeyManager;

var
  Keys: TsgcWSAPIKeyManager;
  WSServer: TsgcWebSocketHTTPServer;
begin
  Keys := TsgcWSAPIKeyManager.Create(nil);
  Keys.OnAPIKeyAuthenticate := DoAuth;

  WSServer := TsgcWebSocketHTTPServer.Create(nil);
  WSServer.Port := 80;
  WSServer.APIKeyManager := Keys;
  WSServer.Active := True;
end;

procedure TForm1.DoAuth(Sender: TObject;
  const aKey: string; var Authenticated: Boolean);
begin
  Authenticated := IsValidKey(aKey);
end;

What's inside

10 published properties, 26 methods, 7 events — pulled from the component reference.

Core

Properties: Enabled.

Generation

Properties: Generation, Hashing.

Storage

Properties: Storage.

Authorization

Properties: Scopes, Validation, Expiration.

Protection

Properties: RateLimit.

Audit

Properties: Audit.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Demo Project — 01.WebSocket\10.APIKeyManager Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Issue Production-Grade API Keys

Download the free trial and add API key management to your sgcWebSockets servers.