Review Board 1.7.22


CommonContainer token refresh changes for a better UX when tokens expire.

Review Request #3180 - Created Dec. 13, 2011 and submitted

Dan Dumont
SHINDIG-1681
Reviewers
shindig
hsaputra, jcian, lixu, rbaxter, ssievers
shindig
Initial review of 1st change.  Allowing common container to manage container token refreshes.  Also, refresh of gadget security tokens will now wait for valid container security token before trying to refresh.
Tested code in a private container with some examples of setting no refresh (ttl = 0) and setting an initial token (if it was written by jsp page to avoid transaction) etc..
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/service.js
Diff Revision 7 Diff Revision 8
[20] 486 lines
[+20] [+] function refresh(fetch_once) {
487
      // No refresh needed, run the callback because the token is fine.
487
      // No refresh needed, run the callback because the token is fine.
488
      callback();
488
      callback();
489
    }
489
    }
490
  };
490
  };
491
})();
491
})();
492

    
   

   
493
// -----------------------------------------------------------------------------

   
494
// Configuration

   
495
// -----------------------------------------------------------------------------

   
496

    
   

   
497

    
   

   
498
/**

   
499
 * Enumeration of configuration keys for this service. This is specified in

   
500
 * JSON to provide extensible configuration.

   
501
 * @enum {string}

   
502
 */

   
503
osapi.container.ServiceConfig = {};

   
504

    
   

   
505
/**

   
506
 * Host to fetch gadget information, via XHR.

   
507
 * @type {string}

   
508
 * @const

   
509
 */

   
510
osapi.container.ServiceConfig.API_HOST = 'apiHost';

   
511

    
   

   
512
/**

   
513
 * Path to fetch gadget information, via XHR.

   
514
 * @type {string}

   
515
 * @const

   
516
 */

   
517
osapi.container.ServiceConfig.API_PATH = 'apiPath';

   
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/constant.js
Diff Revision 7 Diff Revision 8
 
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/feature.xml
Diff Revision 7 Diff Revision 8
 
  1. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/service.js: Loading...
  2. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/constant.js: Loading...
  3. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/feature.xml: Loading...