| // Copyright 2017 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://w3c.github.io/webauthn/#typedefdef-publickeycredentialclientcapabilities |
| |
| typedef record<DOMString, boolean> PublicKeyCredentialClientCapabilities; |
| |
| // https://w3c.github.io/webauthn/#publickeycredential |
| |
| [ |
| RuntimeEnabled=WebAuth, |
| SecureContext, |
| Exposed=Window |
| ] interface PublicKeyCredential : Credential { |
| [SameObject] readonly attribute ArrayBuffer rawId; |
| [SameObject] readonly attribute AuthenticatorResponse response; |
| [SameObject] readonly attribute DOMString? authenticatorAttachment; |
| [CallWith=ScriptState] static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable(); |
| [CallWith=ScriptState] static Promise<PublicKeyCredentialClientCapabilities> getClientCapabilities(); |
| AuthenticationExtensionsClientOutputs getClientExtensionResults(); |
| [CallWith=ScriptState] static Promise<boolean> isConditionalMediationAvailable(); |
| [CallWith=ScriptState] PublicKeyCredentialJSON toJSON(); |
| [CallWith=ScriptState, RaisesException] static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options); |
| [CallWith=ScriptState, RaisesException] static PublicKeyCredentialRequestOptions parseRequestOptionsFromJSON(PublicKeyCredentialRequestOptionsJSON options); |
| [CallWith=ScriptState, RaisesException, Measure] static Promise<undefined> signalUnknownCredential(UnknownCredentialOptions options); |
| [CallWith=ScriptState, RaisesException, Measure] static Promise<undefined> signalAllAcceptedCredentials(AllAcceptedCredentialsOptions options); |
| [CallWith=ScriptState, RaisesException, Measure] static Promise<undefined> signalCurrentUserDetails(CurrentUserDetailsOptions options); |
| }; |