Review Board 1.7.22


gadgets.io.RequestParameters.SIGN_OWNER and gadgets.io.RequestParameters.SIGN_VIEWER not implemented in Shindig

Review Request #5085 - Created May 10, 2012 and submitted

Erik Bi
shindig-1772
Reviewers
shindig
ddumont, rbaxter, ssievers
shindig
The OpenSocial spec says that you should be able to pass 'SIGN_OWNER' and 'SIGN_VIEWER' as parameters to makeRequest. Shindig does not define these and in fact looks for the wrong parameters. In io.js Shindig looks for 'OWNER_SIGNED' and 'VIEWER_SIGNED'. In addition 'SIGN_OWNER' and 'SIGN_VIEWER' should be made constants. 
Update iotest.js
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js
Revision 1327432 New Change
[20] 373 lines
[+20] [+] makeRequest: function(url, callback, opt_params) {
374
        }
374
        }
375
      }
375
      }
376

    
   
376

   
377
      // Include owner information?
377
      // Include owner information?
378
      var signOwner = true;
378
      var signOwner = true;
379
      if (typeof params['OWNER_SIGNED'] !== 'undefined') {
379
      if (typeof params['SIGN_OWNER'] !== 'undefined') {
380
        signOwner = params['OWNER_SIGNED'];
380
        signOwner = params['SIGN_OWNER'];
381
      }
381
      }
382

    
   
382

   
383
      // Include viewer information?
383
      // Include viewer information?
384
      var signViewer = true;
384
      var signViewer = true;
385
      if (typeof params['VIEWER_SIGNED'] !== 'undefined') {
385
      if (typeof params['SIGN_VIEWER'] !== 'undefined') {
386
        signViewer = params['VIEWER_SIGNED'];
386
        signViewer = params['SIGN_VIEWER'];
387
      }
387
      }
388

    
   
388

   
389
      var headers = params['HEADERS'] || {};
389
      var headers = params['HEADERS'] || {};
390
      if (httpMethod === 'POST' && !headers['Content-Type']) {
390
      if (httpMethod === 'POST' && !headers['Content-Type']) {
391
        headers['Content-Type'] = 'application/x-www-form-urlencoded';
391
        headers['Content-Type'] = 'application/x-www-form-urlencoded';
[+20] [20] 173 lines
[+20] [+] getProxyUrl: function(url, opt_params) {
565
  'AUTHORIZATION',
565
  'AUTHORIZATION',
566
  'NUM_ENTRIES',
566
  'NUM_ENTRIES',
567
  'GET_SUMMARIES',
567
  'GET_SUMMARIES',
568
  'GET_FULL_HEADERS',
568
  'GET_FULL_HEADERS',
569
  'REFRESH_INTERVAL',
569
  'REFRESH_INTERVAL',

    
   
570
  'SIGN_OWNER',

    
   
571
  'SIGN_VIEWER',
570
  'OAUTH_SERVICE_NAME',
572
  'OAUTH_SERVICE_NAME',
571
  'OAUTH_USE_TOKEN',
573
  'OAUTH_USE_TOKEN',
572
  'OAUTH_TOKEN_NAME',
574
  'OAUTH_TOKEN_NAME',
573
  'OAUTH_REQUEST_TOKEN',
575
  'OAUTH_REQUEST_TOKEN',
574
  'OAUTH_REQUEST_TOKEN_SECRET',
576
  'OAUTH_REQUEST_TOKEN_SECRET',
[+20] [20] 23 lines
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/proxied-form-post/post.js
Revision 1327432 New Change
 
http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js
Revision 1327432 New Change
 
  1. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js: Loading...
  2. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/proxied-form-post/post.js: Loading...
  3. http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js: Loading...