WebAuthn / Passkeys

Add passkey-based passwordless authentication to your Delphi server. WebAuthn Level 2 / FIDO2 registration and authentication ceremonies, attestation verification, credential storage hooks.

TsgcWSAPIServer_WebAuthn

Implementeert de WebAuthn-relying-party-serverkant — maakt credential-challenges aan, verifieert navigator.credentials-responses, parseert attestation-statements en valideert assertion-handtekeningen.

Component-class

TsgcWSAPIServer_WebAuthn

Platforms

Windows, macOS, Linux, iOS, Android

Editie

Enterprise

Mount de relying party en bewaar credentials

Plaats een TsgcWSAPIServer_WebAuthn op een TsgcWebSocketHTTPServer, configureer RpId/RpName en handel vervolgens OnRegistrationVerify en OnAuthenticationVerify af om credentials op te slaan.

uses
  sgcWebSocket, sgcWebSocket_Server_APIs;

var
  Server: TsgcWebSocketHTTPServer;
  WebAuthn: TsgcWSAPIServer_WebAuthn;
begin
  Server := TsgcWebSocketHTTPServer.Create(nil);
  Server.Port := 8443;
  Server.SSL  := True;

  WebAuthn := TsgcWSAPIServer_WebAuthn.Create(nil);
  WebAuthn.Server := Server;
  WebAuthn.RelyingParty.Id   := 'example.com';
  WebAuthn.RelyingParty.Name := 'Example RP';

  WebAuthn.OnRegistrationVerify := procedure(Sender: TObject;
    const aRequest: TsgcWebAuthn_RegistrationVerify_Request;
    const aRegistration: TsgcWebAuthn_Registration; const aError: string)
  begin
    // aRegistration.CredentialId / publicKey / counter / userHandle opslaan
  end;

  Server.Active := True;
end;
// uses: sgcWebSocket, sgcWebSocket_Server_APIs
TsgcWebSocketHTTPServer *Server = new TsgcWebSocketHTTPServer(this);
TsgcWSAPIServer_WebAuthn *WebAuthn = new TsgcWSAPIServer_WebAuthn(this);
WebAuthn->Server = Server;
WebAuthn->RelyingParty->Id   = "example.com";
WebAuthn->RelyingParty->Name = "Example RP";
Server->Active = true;

Wat zit erin

Een relying-party-server die een Delphi-proces verandert in een passkey-bewust authenticatie-endpoint.

Registratieceremonie

OnRegistrationOptions geeft PublicKeyCredentialCreationOptions uit; de browser roept navigator.credentials.create() aan; OnRegistrationVerify valideert de attestation en geeft het nieuwe credential-record terug.

Authenticatieceremonie

OnAuthenticationOptions geeft PublicKeyCredentialRequestOptions uit met de eerder opgeslagen credential-ID's; OnAuthenticationVerify valideert de assertion-handtekening met de opgeslagen publieke sleutel.

Attestation-parsing

Ondersteunt de attestation-statement-formaten none, packed, fido-u2f, tpm, android-key, android-safetynet en apple.

Counter-validatie

Houdt de signCount per credential bij om gekloonde authenticators te detecteren — als de teller terugloopt, meldt OnAuthenticationVerify een fout waarop je kunt reageren.

Gebruikersverificatie

UserVerification kan per ceremonie worden ingesteld op required, preferred of discouraged — de validatiestap dwingt de keuze af.

Credential-records

OnAuthenticationOptions geeft je de user-handle, zodat je de juiste lijst van allowCredentials teruggeeft voor de lopende login — de opslag mag je zelf ontwerpen.

Specificaties en referenties

Gezaghebbende bronnen voor de standaarden die dit component implementeert.

Documentatie en demo's

Diepe link naar de componentreferentie, pak het kant-en-klare demoproject en download de proefversie.

Online help — TsgcWSAPIServer_WebAuthn Volledige property-, methode- en event-referentie voor dit component.
Demoproject — Demos\20.HTTP_Protocol\12.WebAuthn Kant-en-klaar voorbeeldproject. Zit in het sgcWebSockets-pakket — download hieronder de proefversie.
Technisch document (PDF) Functies, snelstart, codevoorbeelden voor Delphi en C++ Builder en primaire bronreferenties — alleen dit component.
Gebruikershandleiding (PDF) Uitgebreide handleiding die elk component in de bibliotheek behandelt.

Klaar om passkey-authenticatie toe te voegen?

Download de gratis proefversie en breng WebAuthn-/FIDO2-passkeys naar je Delphi-server.