[webappsec-credential-management] Align AuthenticatorSelection… (#36522)

* rename AuthenticatorSelectionCriteria property

* update AuthenticatorSelectionCriteria property

* fix line endings
This commit is contained in:
Michael J. Currie
2019-07-01 11:06:45 -07:00
committed by Ryan Cavanaugh
parent 08ba1b8dfa
commit 62ca99d819
2 changed files with 13 additions and 13 deletions
+3 -2
View File
@@ -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 <https://github.com/iainmcgin>
// Joao Peixoto <https://github.com/Hartimer>
// Michael J. Currie <https://github.com/Basaingeal>
// 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;
}
/**
@@ -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) => {