Bug 1634779 - pt 2. Partially revert Bug 1603006 r=kmag
[gecko.git] / dom / webidl / CredentialManagement.webidl
blob8ce5c5986a92eaa6ba02647c6f28414f27cdff5a
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  */
10 [Exposed=Window, SecureContext, Pref="security.webauth.webauthn"]
11 interface Credential {
12   readonly attribute USVString id;
13   readonly attribute DOMString type;
16 [Exposed=Window, SecureContext, Pref="security.webauth.webauthn"]
17 interface 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<void> preventSilentAccess();
28 dictionary CredentialRequestOptions {
29   // FIXME: bug 1493860: should this "= {}" be here?
30   PublicKeyCredentialRequestOptions publicKey = {};
31   AbortSignal signal;
34 dictionary CredentialCreationOptions {
35   // FIXME: bug 1493860: should this "= {}" be here?
36   PublicKeyCredentialCreationOptions publicKey = {};
37   AbortSignal signal;