const pc = new RTCPeerConnection();
// …
async function logPeerIdentity() {
try {
const identity = await pc.peerIdentity;
console.log(`IdP domain: ${identity.idp}`);
console.log(`Peer name: ${identity.name}`);
} catch (err) {
console.error("Could not verify peer identity:", err);
}
}
logPeerIdentity();RTCIdentityAssertion / notebook
RTCIdentityAssertion
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.