Delegated WebID authentication in 3 lines of JS

Thought I'd post this little nugget:

<script>
      var script = document.createElement('script');
      script.src = 'https://data.fm/user.js?callback=alert';
      document.body.appendChild(script);
</script>

No need for the SAML assertion or an OAuth access token.

Should work in any browser.

This is one of the merits of using a RESTful architecture!

Received on Saturday, 14 January 2012 16:16:43 UTC