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
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
