Bug 1446880: update WebRTC Peer Identity WebIDL. r=smaug
MozReview-Commit-ID: CkszudsSKzl
--- a/dom/webidl/RTCIdentityProvider.webidl
+++ b/dom/webidl/RTCIdentityProvider.webidl
@@ -18,31 +18,32 @@ interface RTCIdentityProviderRegistrar {
* 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,
- optional DOMString usernameHint);
+ optional RTCIdentityProviderOptions options);
/* Forward to idp.validateAssertion() */
[ChromeOnly, Throws]
Promise<RTCIdentityValidationResult>
validateAssertion(DOMString assertion, DOMString origin);
};
dictionary RTCIdentityProvider {
required GenerateAssertionCallback generateAssertion;
required ValidateAssertionCallback validateAssertion;
};
callback GenerateAssertionCallback =
Promise<RTCIdentityAssertionResult>
- (DOMString contents, DOMString origin, optional DOMString usernameHint);
+ (DOMString contents, DOMString origin,
+ RTCIdentityProviderOptions options);
callback ValidateAssertionCallback =
Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
dictionary RTCIdentityAssertionResult {
required RTCIdentityProviderDetails idp;
required DOMString assertion;
};
@@ -50,8 +51,15 @@ dictionary RTCIdentityProviderDetails {
required DOMString domain;
DOMString protocol = "default";
};
dictionary RTCIdentityValidationResult {
required DOMString identity;
required DOMString contents;
};
+
+dictionary RTCIdentityProviderOptions {
+ DOMString protocol = "default";
+ DOMString usernameHint;
+ DOMString peerIdentity;
+};
+
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -78,18 +78,17 @@ dictionary RTCOfferOptions : RTCOfferAns
Constructor (optional RTCConfiguration configuration,
optional object? constraints)]
interface RTCPeerConnection : EventTarget {
[Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
[Pref="media.peerconnection.identity.enabled"]
void setIdentityProvider (DOMString provider,
- optional DOMString protocol,
- optional DOMString username);
+ optional RTCIdentityProviderOptions options);
[Pref="media.peerconnection.identity.enabled"]
Promise<DOMString> getIdentityAssertion();
Promise<RTCSessionDescriptionInit> createOffer (optional RTCOfferOptions options);
Promise<RTCSessionDescriptionInit> createAnswer (optional RTCAnswerOptions options);
Promise<void> setLocalDescription (RTCSessionDescriptionInit description);
Promise<void> setRemoteDescription (RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;