TsgcWSAPIServer_WebAuthn属性 › EndpointsOptions

EndpointsOptions 属性

组件为 WebAuthn 注册、认证、捆绑 JavaScript 库及测试页面提供的 URL 路由。

语法

property EndpointsOptions: TsgcWSWebAuthnEndpoints_Options read FEndpointsOptions write SetEndpointsOptions;

默认值

RegistrationOptions: /sgcWebAuthn/Registration/Options;RegistrationVerify: /sgcWebAuthn/Registration/Verify;AuthenticationOptions: /sgcWebAuthn/Authentication/Options;AuthenticationVerify: /sgcWebAuthn/Authentication/Verify;WebAuthn(JS 库):已启用;测试:已禁用。

备注

配置组件公开的 HTTP 端点,用于处理来自浏览器 JavaScript 层的 WebAuthn 流量。每个条目都有一个 Enabled 标志和一个可自定义的 Endpoint URL 路径。RegistrationOptions 返回挑战和信赖方数据,以便验证器创建新凭据;RegistrationVerify 接收证明并存储公钥。AuthenticationOptions 返回登录挑战;AuthenticationVerify 使用存储的公钥验证断言。WebAuthn 提供捆绑的 JavaScript 辅助工具;如需使用自己的 WebAuthn 客户端库,请禁用它。Test 提供 HTML 测试页,生产环境中应保持禁用。

示例

oWebAuthn.EndpointsOptions.RegistrationOptions.Endpoint := '/api/webauthn/register/options';
oWebAuthn.EndpointsOptions.RegistrationVerify.Endpoint := '/api/webauthn/register/verify';
oWebAuthn.EndpointsOptions.AuthenticationOptions.Endpoint := '/api/webauthn/login/options';
oWebAuthn.EndpointsOptions.AuthenticationVerify.Endpoint := '/api/webauthn/login/verify';
oWebAuthn.EndpointsOptions.WebAuthn.Enabled := True;
oWebAuthn.EndpointsOptions.Test.Enabled := False;

返回属性