1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * https://www.w3.org/TR/credential-management-1/ 8 */ 9 10[Exposed=Window, SecureContext, Pref="security.webauth.webauthn"] 11interface Credential { 12 readonly attribute USVString id; 13 readonly attribute DOMString type; 14}; 15 16[Exposed=Window, SecureContext, Pref="security.webauth.webauthn"] 17interface CredentialsContainer { 18 [Throws] 19 Promise<Credential?> get(optional CredentialRequestOptions options); 20 [Throws] 21 Promise<Credential?> create(optional CredentialCreationOptions options); 22 [Throws] 23 Promise<Credential> store(Credential credential); 24 [Throws] 25 Promise<undefined> preventSilentAccess(); 26}; 27 28dictionary CredentialRequestOptions { 29 PublicKeyCredentialRequestOptions publicKey; 30 AbortSignal signal; 31}; 32 33dictionary CredentialCreationOptions { 34 PublicKeyCredentialCreationOptions publicKey; 35 AbortSignal signal; 36}; 37