2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2017-05-17 03:07:01 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* https://www.w3.org/TR/credential-management-1/
|
|
|
|
*/
|
|
|
|
|
|
|
|
[Exposed=Window, SecureContext, Pref="security.webauth.webauthn"]
|
|
|
|
interface Credential {
|
|
|
|
readonly attribute USVString id;
|
|
|
|
readonly attribute DOMString type;
|
|
|
|
};
|
2017-05-23 03:09:49 +03:00
|
|
|
|
|
|
|
[Exposed=Window, SecureContext, Pref="security.webauth.webauthn"]
|
|
|
|
interface CredentialsContainer {
|
2017-10-13 04:18:39 +03:00
|
|
|
[Throws]
|
2017-05-24 00:55:10 +03:00
|
|
|
Promise<Credential?> get(optional CredentialRequestOptions options);
|
2017-10-13 04:18:39 +03:00
|
|
|
[Throws]
|
2017-05-23 03:09:49 +03:00
|
|
|
Promise<Credential?> create(optional CredentialCreationOptions options);
|
2017-10-13 04:18:39 +03:00
|
|
|
[Throws]
|
2017-10-13 03:02:22 +03:00
|
|
|
Promise<Credential> store(Credential credential);
|
2018-02-22 16:36:08 +03:00
|
|
|
[Throws]
|
|
|
|
Promise<void> preventSilentAccess();
|
2017-05-23 03:09:49 +03:00
|
|
|
};
|
|
|
|
|
2017-05-24 00:55:10 +03:00
|
|
|
dictionary CredentialRequestOptions {
|
2018-09-26 01:09:30 +03:00
|
|
|
// FIXME: bug 1493860: should this "= null" be here?
|
|
|
|
PublicKeyCredentialRequestOptions publicKey = null;
|
2017-11-17 11:44:50 +03:00
|
|
|
AbortSignal signal;
|
2017-05-24 00:55:10 +03:00
|
|
|
};
|
|
|
|
|
2017-05-23 03:09:49 +03:00
|
|
|
dictionary CredentialCreationOptions {
|
2018-09-26 01:09:30 +03:00
|
|
|
// FIXME: bug 1493860: should this "= null" be here?
|
|
|
|
PublicKeyCredentialCreationOptions publicKey = null;
|
2017-11-17 11:44:50 +03:00
|
|
|
AbortSignal signal;
|
2017-05-23 03:09:49 +03:00
|
|
|
};
|