2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-02-22 00:57:20 +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/.
|
|
|
|
*
|
|
|
|
* http://w3c.github.io/webrtc-pc/ (with https://github.com/w3c/webrtc-pc/pull/178)
|
|
|
|
*/
|
|
|
|
|
2019-09-27 18:26:14 +03:00
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=Window]
|
2015-02-22 00:57:20 +03:00
|
|
|
interface RTCIdentityProviderRegistrar {
|
|
|
|
void register(RTCIdentityProvider idp);
|
|
|
|
|
2016-03-24 08:12:56 +03:00
|
|
|
/* Whether an IdP was passed to register() to chrome code. */
|
2015-02-22 00:57:20 +03:00
|
|
|
[ChromeOnly]
|
2016-03-24 08:12:56 +03:00
|
|
|
readonly attribute boolean hasIdp;
|
2015-02-22 00:57:20 +03:00
|
|
|
/* The following two chrome-only functions forward to the corresponding
|
|
|
|
* function on the registered IdP. This is necessary because the
|
|
|
|
* JS-implemented WebIDL can't see these functions on `idp` above, chrome JS
|
|
|
|
* gets an Xray onto the content code that suppresses functions, see
|
|
|
|
* https://developer.mozilla.org/en-US/docs/Xray_vision#Xrays_for_JavaScript_objects
|
|
|
|
*/
|
|
|
|
/* Forward to idp.generateAssertion() */
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
Promise<RTCIdentityAssertionResult>
|
|
|
|
generateAssertion(DOMString contents, DOMString origin,
|
2019-07-03 10:52:35 +03:00
|
|
|
optional RTCIdentityProviderOptions options = {});
|
2015-02-22 00:57:20 +03:00
|
|
|
/* Forward to idp.validateAssertion() */
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
Promise<RTCIdentityValidationResult>
|
|
|
|
validateAssertion(DOMString assertion, DOMString origin);
|
|
|
|
};
|
|
|
|
|
2016-03-24 08:12:56 +03:00
|
|
|
dictionary RTCIdentityProvider {
|
|
|
|
required GenerateAssertionCallback generateAssertion;
|
|
|
|
required ValidateAssertionCallback validateAssertion;
|
2016-03-24 05:25:39 +03:00
|
|
|
};
|
2016-03-23 19:03:06 +03:00
|
|
|
|
2016-03-24 08:12:56 +03:00
|
|
|
callback GenerateAssertionCallback =
|
|
|
|
Promise<RTCIdentityAssertionResult>
|
2018-03-19 09:15:37 +03:00
|
|
|
(DOMString contents, DOMString origin,
|
|
|
|
RTCIdentityProviderOptions options);
|
2016-03-24 08:12:56 +03:00
|
|
|
callback ValidateAssertionCallback =
|
|
|
|
Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
|
|
|
|
|
2015-02-22 00:57:20 +03:00
|
|
|
dictionary RTCIdentityAssertionResult {
|
|
|
|
required RTCIdentityProviderDetails idp;
|
|
|
|
required DOMString assertion;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIdentityProviderDetails {
|
|
|
|
required DOMString domain;
|
|
|
|
DOMString protocol = "default";
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIdentityValidationResult {
|
|
|
|
required DOMString identity;
|
|
|
|
required DOMString contents;
|
|
|
|
};
|
2018-03-19 09:15:37 +03:00
|
|
|
|
|
|
|
dictionary RTCIdentityProviderOptions {
|
|
|
|
DOMString protocol = "default";
|
|
|
|
DOMString usernameHint;
|
|
|
|
DOMString peerIdentity;
|
|
|
|
};
|
|
|
|
|