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 — 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.
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.
TsgcWSAPIKeyManager
Server-side admission control.
Windows, macOS, Linux, iOS, Android
Professional / Enterprise
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;
10 published properties, 26 methods, 7 events — pulled from the component reference.
Properties: Enabled.
Properties: Generation, Hashing.
Properties: Storage.
Properties: Scopes, Validation, Expiration.
Properties: RateLimit.
Properties: Audit.
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. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |