TsgcWSAPIServer_WebAuthn方法 › KeepAlive

KeepAlive 方法

在给定连接上发送保活 ping,防止已认证的会话超时。

语法

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

参数

名称类型描述
aConnectionconst TsgcWSConnection必须传递保活消息的连接。
aMessageconst string随 keep-alive 发送的可选有效载荷;为空时使用协议定义的 ping。

备注

刷新与连接关联的 WebAuthn 会话的时间戳,以防止短期令牌在客户端空闲时失效。当长时间连接必须保持身份验证时,请从计时器定期调用。

示例

sgcWSAPIServer_WebAuthn1.KeepAlive(aConnection, 'ping');

返回方法