From 62ca99d819e8929b91870f0ebb530bee3fca771f Mon Sep 17 00:00:00 2001 From: "Michael J. Currie" Date: Mon, 1 Jul 2019 13:06:45 -0500 Subject: [PATCH] =?UTF-8?q?[webappsec-credential-management]=20Align=20Aut?= =?UTF-8?q?henticatorSelection=E2=80=A6=20(#36522)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rename AuthenticatorSelectionCriteria property * update AuthenticatorSelectionCriteria property * fix line endings --- .../index.d.ts | 5 +++-- .../webappsec-credential-management-tests.ts | 21 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/types/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts index b2bc6bc006..ad423eb940 100644 --- a/types/webappsec-credential-management/index.d.ts +++ b/types/webappsec-credential-management/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for non-npm package W3C (WebAppSec) Credential Management API Level 1, 0.3 +// Type definitions for non-npm package W3C (WebAppSec) Credential Management API Level 1, 0.4 // Project: https://github.com/w3c/webappsec-credential-management // Definitions by: Iain McGinniss // Joao Peixoto +// Michael J. Currie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 @@ -444,7 +445,7 @@ type AuthenticatorAttachment = "platform" | "cross-platform"; interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; - requireUserVerification?: UserVerificationRequirement; + userVerification?: UserVerificationRequirement; } /** diff --git a/types/webappsec-credential-management/webappsec-credential-management-tests.ts b/types/webappsec-credential-management/webappsec-credential-management-tests.ts index ade1ecfa71..78dc73837b 100644 --- a/types/webappsec-credential-management/webappsec-credential-management-tests.ts +++ b/types/webappsec-credential-management/webappsec-credential-management-tests.ts @@ -296,29 +296,28 @@ function webauthnRegister() { name: document.domain, }, user: { - id: (new Uint8Array(1)).buffer, + id: new Uint8Array(1).buffer, name: 'test user', displayName: 'test user', }, challenge, - pubKeyCredParams: [ - { type: 'public-key', alg: -7 }, - ], + pubKeyCredParams: [{ type: 'public-key', alg: -7 }], excludeCredentials: [ { - id: (new Uint8Array(1)).buffer, + id: new Uint8Array(1).buffer, type: 'public-key', - transports: ['ble', 'internal'] - } + transports: ['ble', 'internal'], + }, ], timeout: 5000, - attestation: "direct", + attestation: 'direct', authenticatorSelection: { - requireUserVerification: "preferred", + userVerification: 'preferred', + requireResidentKey: false, - authenticatorAttachment: "platform" + authenticatorAttachment: 'platform', }, - } + }, }); credPromise.then((cred) => {