Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / RTCIdentityProvider.webidl
blob4755503276cd4a87071ee4d39c9c816cdcba3317
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  * http://w3c.github.io/webrtc-pc/ (with https://github.com/w3c/webrtc-pc/pull/178)
7  */
9 [LegacyNoInterfaceObject,
10  Exposed=Window]
11 interface RTCIdentityProviderRegistrar {
12   undefined register(RTCIdentityProvider idp);
14   /* Whether an IdP was passed to register() to chrome code. */
15   [ChromeOnly]
16   readonly attribute boolean hasIdp;
17   /* The following two chrome-only functions forward to the corresponding
18    * function on the registered IdP.  This is necessary because the
19    * JS-implemented WebIDL can't see these functions on `idp` above, chrome JS
20    * gets an Xray onto the content code that suppresses functions, see
21    * https://developer.mozilla.org/en-US/docs/Xray_vision#Xrays_for_JavaScript_objects
22    */
23   /* Forward to idp.generateAssertion() */
24   [ChromeOnly, Throws]
25   Promise<RTCIdentityAssertionResult>
26   generateAssertion(DOMString contents, DOMString origin,
27                     optional RTCIdentityProviderOptions options = {});
28   /* Forward to idp.validateAssertion() */
29   [ChromeOnly, Throws]
30   Promise<RTCIdentityValidationResult>
31   validateAssertion(DOMString assertion, DOMString origin);
34 dictionary RTCIdentityProvider {
35   required GenerateAssertionCallback generateAssertion;
36   required ValidateAssertionCallback validateAssertion;
39 callback GenerateAssertionCallback =
40   Promise<RTCIdentityAssertionResult>
41     (DOMString contents, DOMString origin,
42      RTCIdentityProviderOptions options);
43 callback ValidateAssertionCallback =
44   Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
46 dictionary RTCIdentityAssertionResult {
47   required RTCIdentityProviderDetails idp;
48   required DOMString assertion;
51 dictionary RTCIdentityProviderDetails {
52   required DOMString domain;
53   DOMString protocol = "default";
56 dictionary RTCIdentityValidationResult {
57   required DOMString identity;
58   required DOMString contents;
61 dictionary RTCIdentityProviderOptions {
62   DOMString protocol = "default";
63   DOMString usernameHint;
64   DOMString peerIdentity;