TsgcWSAPIServer_WebAuthn › Methods › KeepAlive
Sends a keep-alive ping on the given connection to prevent the authenticated session from expiring.
procedure KeepAlive(const aConnection: TsgcWSConnection; const aMessage: string);
| Name | Type | Description |
|---|---|---|
aConnection | const TsgcWSConnection | Connection on which the keep-alive message must be delivered. |
aMessage | const string | Optional payload sent with the keep-alive; when empty a protocol-defined ping is used. |
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.
sgcWSAPIServer_WebAuthn1.KeepAlive(aConnection, 'ping');