Merge autoland to mozilla central a=merge
[gecko.git] / dom / webauthn / nsIWebAuthnResult.idl
blob32ce6982773ac118c6148e1089d52065a56835fb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 [uuid(0567c384-a728-11ed-85f7-030324a370f0)]
9 interface nsIWebAuthnRegisterResult : nsISupports {
10 readonly attribute ACString clientDataJSON;
12 // The serialied attestation object as defined in
13 // https://www.w3.org/TR/webauthn-2/#sctn-attestation
14 // Includes the format, the attestation statement, and
15 // the authenticator data.
16 readonly attribute Array<octet> attestationObject;
18 // The Credential ID field of the Attestation Object's Attested
19 // Credential Data. This is used to construct the rawID field of a
20 // WebAuthn PublicKeyCredential without having to parse the
21 // attestationObject.
22 readonly attribute Array<octet> credentialId;
24 readonly attribute Array<AString> transports;
26 readonly attribute boolean hmacCreateSecret;
28 [must_use] attribute boolean credPropsRk;
30 [must_use] readonly attribute AString authenticatorAttachment;
32 boolean hasIdentifyingAttestation();
33 void anonymize();
36 // The nsIWebAuthnSignResult interface is used to construct IPDL-defined
37 // WebAuthnGetAssertionResult from either Rust or C++.
39 [uuid(05fff816-a728-11ed-b9ac-ff38cc2c8c28)]
40 interface nsIWebAuthnSignResult : nsISupports {
41 readonly attribute ACString clientDataJSON;
43 // The ID field of the PublicKeyCredentialDescriptor returned
44 // from authenticatorGetAssertion.
45 readonly attribute Array<octet> credentialId;
47 // The authData field of the authenticatorGetAssertion response
48 readonly attribute Array<octet> authenticatorData;
50 // The signature field of the authenticatorGetAssertion response
51 readonly attribute Array<octet> signature;
53 // The ID field of the PublicKeyCredentialUserEntity returned from
54 // authenticatorGetAssertion. (Optional)
55 [must_use] readonly attribute Array<octet> userHandle;
57 // The displayName field of the PublicKeyCredentialUserEntity
58 // returned from authenticatorGetAssertion. (Optional)
59 [must_use] readonly attribute ACString userName;
61 // appId field of AuthenticationExtensionsClientOutputs (Optional)
62 [must_use] attribute boolean usedAppId;
64 [must_use] readonly attribute AString authenticatorAttachment;