TsgcWSAPIServer_WebAuthnPropriedades › WebAuthnOptions

WebAuthnOptions Property

Configuração da Relying Party: RPName, RPID, Origins, Algorithms suportados, formatos de Attestation, User Verification, Timeout e AuthenticatorSelection.

Sintaxe

property WebAuthnOptions: TsgcWSWebAuthnServer_Options read FWebAuthnOptions write SetWebAuthnOptions;

Valor Padrão

RelyingParty (RPID) vazio — deve ser definido como o nome DNS do servidor. Algorithms: ES256 + RS256. Todos os formatos de Attestation habilitados. AllowCrossOrigins: false. AllowCredentials: false. ExcludeCredentials: false.

Observações

Configurações principais da Relying Party WebAuthn (FIDO2) usadas tanto para registro de credencial (navigator.credentials.create()) quanto para autenticação (navigator.credentials.get()). RelyingParty é obrigatório e deve corresponder ao nome DNS do servidor (por exemplo www.test.com). Origins e TopOrigins extras podem ser configurados quando as requisições vêm de domínios adicionais ou iframes incorporados, e AllowCrossOrigins habilita fluxos de iframe cross-origin. O conjunto Algorithms controla quais algoritmos de assinatura COSE são aceitos (ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384, PS512, RS1, EdDSA); por padrão, apenas ES256 e RS256 são habilitados. Os formatos de Attestation (None, Packed, TPM, AndroidKey, Apple, FidoU2F) podem ser habilitados ou desabilitados individualmente. AllowCredentials / ExcludeCredentials / Limit controlam quais IDs de credencial são enviados ao cliente durante a autenticação e o registro.

Exemplo

oWebAuthn.WebAuthnOptions.RelyingParty := 'www.test.com';
oWebAuthn.WebAuthnOptions.Origins.Add('https://login.test.com');
oWebAuthn.WebAuthnOptions.Algorithms.ES256 := True;
oWebAuthn.WebAuthnOptions.Algorithms.RS256 := True;
oWebAuthn.WebAuthnOptions.Attestation.NoneAttestation := True;
oWebAuthn.WebAuthnOptions.Attestation.PackedAttestation := True;
oWebAuthn.WebAuthnOptions.Credentials.ExcludeCredentials := True;
oWebAuthn.WebAuthnOptions.Credentials.Limit := 10;

Voltar para Propriedades