idp-min.js (763B)
1 (function (global) { 2 "use strict"; 3 // A minimal implementation of the interface. 4 // Though this isn't particularly functional. 5 // This is needed so that we can have a "working" IdP served 6 // from two different locations in the tree. 7 global.rtcIdentityProvider.register({ 8 generateAssertion(payload, origin, usernameHint) { 9 dump("idp: generateAssertion(" + payload + ")\n"); 10 return Promise.resolve({ 11 idp: { domain: "example.com", protocol: "idp.js" }, 12 assertion: "bogus", 13 }); 14 }, 15 16 validateAssertion(assertion, origin) { 17 dump("idp: validateAssertion(" + assertion + ")\n"); 18 return Promise.resolve({ 19 identity: "user@example.com", 20 contents: "bogus", 21 }); 22 }, 23 }); 24 })(this);