RTCPeerConnection: setIdentityProvider() method

The setIdentityProvider() method of the RTCPeerConnection interface sets the Identity Provider (IdP) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username. The IdP will be used only when an assertion is needed.

If the signalingState is set to "closed", an InvalidStateError is raised.

Syntax

js
setIdentityProvider(domainname)
setIdentityProvider(domainname, protocol)
setIdentityProvider(domainname, protocol, username)

Parameters

domainname

A string representing the domain name where the IdP is.

protocol Optional

A string representing the protocol used to communicate with the IdP. It defaults to "default" and is used to determine the URL where the IdP is listening.

username Optional

A string representing the username associated with the IdP.

Return value

None (undefined).

Example

js
const pc = new RTCPeerConnection();

pc.setIdentityProvider("developer.mozilla.org");

Specifications

Specification
Identity for WebRTC 1.0
# dom-rtcpeerconnection-setidentityprovider

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
setIdentityProvider
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge 18 – 18 (Release date: 2018-10-02)
footnote Removed in 79 and later
Firefox – Full support
Firefox 40 (Release date: 2015-08-11)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Full support
Firefox for Android 40 (Release date: 2015-08-11)
footnote Full support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

See also