Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Google data APIs allow web-based applications to authenticate using a method called AuthSub. The process is illustrated below and involves two stages: obtaining an authentication token (steps 1-4) and using the token to authenticate with the Google data service (steps 5-6).

  1. The web application (an OpenSocial app, in this case) sends a HTTP request to the Google Accounts page.
  2. The user is prompted to enter their username and password (or select an account that is already authenticated).
  3. The user enters their credentials or selects previously authenticated account.
  4. The user is redirected back to the application with a 'token' URL parameter.
  5. The application invokes the Google data service (Google Calendar for example) using the token for authentication.
  6. The Google data service responds.

...

Panel

function getUrlParam(name) {
name = name.replace(/-(/,"\\\[").replace(/[]/,"\\\]");
var regexS = "-?&" + name + "=(^&#\*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results h1. null )
return null;
else
return results1-9

...