// Copied from https://www.w3.org/TR/webauthn/#idl-index as of 5 December 2017 [SecureContext, Exposed=Window] interface PublicKeyCredential : Credential { [SameObject] readonly attribute ArrayBuffer rawId; [SameObject] readonly attribute AuthenticatorResponse response; AuthenticationExtensions getClientExtensionResults(); }; partial dictionary CredentialCreationOptions { MakePublicKeyCredentialOptions publicKey; }; partial dictionary CredentialRequestOptions { PublicKeyCredentialRequestOptions publicKey; }; partial interface PublicKeyCredential { static Promise < boolean > isUserVerifyingPlatformAuthenticatorAvailable(); }; [SecureContext, Exposed=Window] interface AuthenticatorResponse { [SameObject] readonly attribute ArrayBuffer clientDataJSON; }; [SecureContext, Exposed=Window] interface AuthenticatorAttestationResponse : AuthenticatorResponse { [SameObject] readonly attribute ArrayBuffer attestationObject; }; [SecureContext, Exposed=Window] interface AuthenticatorAssertionResponse : AuthenticatorResponse { [SameObject] readonly attribute ArrayBuffer authenticatorData; [SameObject] readonly attribute ArrayBuffer signature; [SameObject] readonly attribute ArrayBuffer userHandle; }; dictionary PublicKeyCredentialParameters { required PublicKeyCredentialType type; required COSEAlgorithmIdentifier alg; }; dictionary MakePublicKeyCredentialOptions { required PublicKeyCredentialRpEntity rp; required PublicKeyCredentialUserEntity user; required BufferSource challenge; required sequence pubKeyCredParams; unsigned long timeout; sequence excludeCredentials = []; AuthenticatorSelectionCriteria authenticatorSelection; AttestationConveyancePreference attestation = "none"; AuthenticationExtensions extensions; }; dictionary PublicKeyCredentialEntity { required DOMString name; USVString icon; }; dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity { DOMString id; }; dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity { required BufferSource id; required DOMString displayName; }; dictionary AuthenticatorSelectionCriteria { AuthenticatorAttachment authenticatorAttachment; boolean requireResidentKey = false; UserVerificationRequirement userVerification = "preferred"; }; enum AuthenticatorAttachment { "platform", // Platform attachment "cross-platform" // Cross-platform attachment }; enum AttestationConveyancePreference { "none", "indirect", "direct" }; dictionary PublicKeyCredentialRequestOptions { required BufferSource challenge; unsigned long timeout; USVString rpId; sequence allowCredentials = []; UserVerificationRequirement userVerification = "preferred"; AuthenticationExtensions extensions; }; typedef record AuthenticationExtensions; dictionary CollectedClientData { required DOMString type; required DOMString challenge; required DOMString origin; required DOMString hashAlgorithm; DOMString tokenBindingId; AuthenticationExtensions clientExtensions; AuthenticationExtensions authenticatorExtensions; }; enum PublicKeyCredentialType { "public-key" }; dictionary PublicKeyCredentialDescriptor { required PublicKeyCredentialType type; required BufferSource id; sequence transports; }; enum AuthenticatorTransport { "usb", "nfc", "ble" }; typedef long COSEAlgorithmIdentifier; enum UserVerificationRequirement { "required", "preferred", "discouraged" }; typedef sequence AuthenticatorSelectionList; typedef BufferSource AAGUID;