MDN self-hosted library · e01.org

RTCIdentityAssertion: idp property

WebRTC

Open notebook · 1 cells web-api-instance-property upstream source

WebRTC

The idp property of the RTCIdentityAssertion interface indicates the domain name of the identity provider (IdP) that validated the identity assertion (a verified claim of the remote peer's identity).

Value

A string containing the domain name of the identity provider that validated this identity.

Examples

Displaying the identity provider domain

In this example, the RTCPeerConnection.peerIdentity promise resolves with an RTCIdentityAssertion whose idp property is logged to the console.

const pc = new RTCPeerConnection();

// …

async function getIdentityProvider() {
  try {
    const identity = await pc.peerIdentity;
    console.log(`Identity provider: ${identity.idp}`);
  } catch (err) {
    console.error("Failed to get peer identity:", err);
  }
}

getIdentityProvider();

Specifications

Browser compatibility

See also

  • RTCIdentityAssertion.name
  • RTCPeerConnection.peerIdentity
  • WebRTC API