TsgcWSAPIServer_WebAuthnMethods › KeepAlive

KeepAlive Method

Sends a keep-alive ping on the given connection to prevent the authenticated session from expiring.

Syntax

procedure KeepAlive(const aConnection: TsgcWSConnection; const aMessage: string);

Parameters

NameTypeDescription
aConnectionconst TsgcWSConnectionConnection on which the keep-alive message must be delivered.
aMessageconst stringOptional payload sent with the keep-alive; when empty a protocol-defined ping is used.

Remarks

Refreshes the timestamp of the WebAuthn session associated with the connection so that short-lived tokens are not invalidated while the client is idle. Call periodically from a timer when long-lived connections must stay authenticated.

Example

sgcWSAPIServer_WebAuthn1.KeepAlive(aConnection, 'ping');

Back to Methods