Return-Path: X-Original-To: apmail-shindig-dev-archive@www.apache.org Delivered-To: apmail-shindig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77022BBBE for ; Tue, 10 Jan 2012 18:48:28 +0000 (UTC) Received: (qmail 68509 invoked by uid 500); 10 Jan 2012 18:48:28 -0000 Delivered-To: apmail-shindig-dev-archive@shindig.apache.org Received: (qmail 68423 invoked by uid 500); 10 Jan 2012 18:48:26 -0000 Mailing-List: contact dev-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shindig.apache.org Delivered-To: mailing list dev@shindig.apache.org Received: (qmail 68397 invoked by uid 99); 10 Jan 2012 18:48:26 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 18:48:26 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 2286B1C035D; Tue, 10 Jan 2012 18:48:26 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0899676278534659319==" MIME-Version: 1.0 Subject: Re: Review Request: CommonContainer token refresh changes for a better UX when tokens expire. From: "Jesse Ciancetta" To: "Jesse Ciancetta" , "li xu" , "Ryan Baxter" , "Stanton Sievers" , "Henry Saputra" Date: Tue, 10 Jan 2012 18:48:26 -0000 Message-ID: <20120110184826.6698.5417@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/3180/ Cc: "shindig" ,"Dan Dumont" In-Reply-To: <20120110145957.6698.9733@reviews.apache.org> References: <20120110145957.6698.9733@reviews.apache.org> --===============0899676278534659319== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3180/#review4298 ----------------------------------------------------------- http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/= features/container.gadget/gadget_site.js This code (or something very similar) ends up repeated in a bunch of di= fferent places -- it might be worth making a utility function somewhere whi= ch takes the gadget URL and moduleId and returns the properly formatted str= ing. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/= features/container/container.js You may be able to get away from using this function for gadget token r= efresh and maybe even eliminate it entirely -- see my next comment around o= sapi.container.Container.prototype.refreshTokens_() http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/= features/container/container.js In the patch I was working on for moduleId's I took a different approac= h here which I think you may be able to do as well. I think in my patch --= any all the gadget tokens we had already fetched either by pre-load or nav= igating a gadget (which would make them eligible for refresh) were cached i= n the Service object -- so it seemed to me that knowing what tokens needed = refresh was a simple matter of getting the keys from the gadget token cache= map in the Service object. = It looks like your keying the gadget token cache in the Service object = with the gadget spec URL + moduleId as well (or just a raw gadget spec URL = in the case of no moduleId) so it *seems* like that strategy might work for= you here too. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/= features/container/service.js This looks like it is supposed to be: = url.setFragment(moduleId) http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/= features/container/service.js Is this supposed to be calling url.toString() instead of keying the cac= he with the actual shindig.uri object? - Jesse On 2012-01-10 14:59:57, Dan Dumont wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/3180/ > ----------------------------------------------------------- > = > (Updated 2012-01-10 14:59:57) > = > = > Review request for shindig, Henry Saputra, Ryan Baxter, li xu, Jesse Cian= cetta, and Stanton Sievers. > = > = > Summary > ------- > = > Initial review of 1st change. Allowing common container to manage contai= ner token refreshes. Also, refresh of gadget security tokens will now wait= for valid container security token before trying to refresh. > = > = > This addresses bug SHINDIG-1681. > https://issues.apache.org/jira/browse/SHINDIG-1681 > = > = > Diffs > ----- > = > http://svn.apache.org/repos/asf/shindig/trunk/content/samplecontainer/e= xamples/commoncontainer/assembler.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container.gadget/gadget_holder.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container.gadget/gadget_site.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container.util/constant.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container.util/feature.xml 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container.util/util.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container/container.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container/feature.xml 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascr= ipt/features/container/service.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascr= ipt/features/container/gadget_holder_test.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascr= ipt/features/container/service_test.js 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java= /org/apache/shindig/auth/AbstractSecurityToken.java 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/jav= a/org/apache/shindig/gadgets/servlet/GadgetsHandler.java 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/jav= a/org/apache/shindig/gadgets/servlet/GadgetsHandlerApi.java 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/jav= a/org/apache/shindig/gadgets/servlet/GadgetsHandlerService.java 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/jav= a/org/apache/shindig/gadgets/servlet/ModuleIdManager.java PRE-CREATION = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/jav= a/org/apache/shindig/gadgets/servlet/ModuleIdManagerImpl.java PRE-CREATION = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/jav= a/org/apache/shindig/gadgets/servlet/GadgetsHandlerServiceTest.java 1222407 = > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/jav= a/org/apache/shindig/gadgets/servlet/GadgetsHandlerTest.java 1222407 = > = > Diff: https://reviews.apache.org/r/3180/diff > = > = > Testing > ------- > = > Tested code in a private container with some examples of setting no refre= sh (ttl =3D 0) and setting an initial token (if it was written by jsp page = to avoid transaction) etc.. > = > = > Thanks, > = > Dan > = > --===============0899676278534659319==--