webrtc-identity.idl (2919B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Identity for WebRTC 1.0 (https://w3c.github.io/webrtc-identity/) 5 6 [Global=(Worker,RTCIdentityProvider), Exposed=RTCIdentityProvider] 7 interface RTCIdentityProviderGlobalScope : WorkerGlobalScope { 8 readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider; 9 }; 10 11 [Exposed=RTCIdentityProvider] 12 interface RTCIdentityProviderRegistrar { 13 undefined register (RTCIdentityProvider idp); 14 }; 15 16 dictionary RTCIdentityProvider { 17 required GenerateAssertionCallback generateAssertion; 18 required ValidateAssertionCallback validateAssertion; 19 }; 20 21 callback GenerateAssertionCallback = Promise<RTCIdentityAssertionResult> 22 (DOMString contents, DOMString origin, optional RTCIdentityProviderOptions options = {}); 23 24 callback ValidateAssertionCallback = Promise<RTCIdentityValidationResult> 25 (DOMString assertion, DOMString origin); 26 27 dictionary RTCIdentityAssertionResult { 28 required RTCIdentityProviderDetails idp; 29 required DOMString assertion; 30 }; 31 32 dictionary RTCIdentityProviderDetails { 33 required DOMString domain; 34 DOMString protocol = "default"; 35 }; 36 37 dictionary RTCIdentityValidationResult { 38 required DOMString identity; 39 required DOMString contents; 40 }; 41 42 partial interface RTCPeerConnection { 43 undefined setIdentityProvider (DOMString provider, optional RTCIdentityProviderOptions options = {}); 44 Promise<DOMString> getIdentityAssertion (); 45 readonly attribute Promise<RTCIdentityAssertion> peerIdentity; 46 readonly attribute DOMString? idpLoginUrl; 47 readonly attribute DOMString? idpErrorInfo; 48 }; 49 50 partial dictionary RTCConfiguration { 51 DOMString peerIdentity; 52 }; 53 54 dictionary RTCIdentityProviderOptions { 55 DOMString protocol = "default"; 56 DOMString usernameHint; 57 DOMString peerIdentity; 58 }; 59 60 [Exposed=Window] 61 interface RTCIdentityAssertion { 62 constructor(DOMString idp, DOMString name); 63 attribute DOMString idp; 64 attribute DOMString name; 65 }; 66 67 partial interface RTCError { 68 readonly attribute long? httpRequestStatusCode; 69 }; 70 71 partial dictionary RTCErrorInit { 72 long httpRequestStatusCode; 73 }; 74 75 // This is an extension of RTCErrorDetailType from [[WEBRTC-PC]] 76 // Unfortunately, WebIDL does not support partial enums (yet). 77 // 78 // partial enum RTCErrorDetailType { 79 enum RTCErrorDetailTypeIdp { 80 "idp-bad-script-failure", 81 "idp-execution-failure", 82 "idp-load-failure", 83 "idp-need-login", 84 "idp-timeout", 85 "idp-tls-failure", 86 "idp-token-expired", 87 "idp-token-invalid", 88 }; 89 90 partial dictionary MediaStreamConstraints { 91 DOMString peerIdentity; 92 }; 93 94 partial interface MediaStreamTrack { 95 readonly attribute boolean isolated; 96 attribute EventHandler onisolationchange; 97 };