You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Dan Dumont <dd...@us.ibm.com> on 2011/11/01 14:48:40 UTC

Re: Review Request: Push down the token TTL to container page so it can schedule token refreshes accordingly.


> On 2011-10-31 02:09:02, Ryan Baxter wrote:
> > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js, line 609
> > <https://reviews.apache.org/r/2525/diff/2/?file=53449#file53449line609>
> >
> >     I believe there is a function int he container utils to give you the current ms, probably want to use that

Ok, but it seems silly to have a function for that...   It probably gets inlined by closure anyway.


> On 2011-10-31 02:09:02, Ryan Baxter wrote:
> > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerService.java, line 544
> > <https://reviews.apache.org/r/2525/diff/2/?file=53458#file53458line544>
> >
> >     Seems like it might make sense to update the unit tests which validate the info returned in the metadata request to check for the ttl.

ok


> On 2011-10-31 02:09:02, Ryan Baxter wrote:
> > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js, line 225
> > <https://reviews.apache.org/r/2525/diff/2/?file=53449#file53449line225>
> >
> >     Are there any cases where the token TTL would not be returned in the metadata?  I assume not...

I'll put a check in the called method just in case.


- Dan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2525/#review2935
-----------------------------------------------------------


On 2011-10-26 17:46:48, Dan Dumont wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/2525/
> -----------------------------------------------------------
> 
> (Updated 2011-10-26 17:46:48)
> 
> 
> Review request for shindig.
> 
> 
> Summary
> -------
> 
> This change adds the token TTL to the metadata request for a gadget needing token refresh.
> The container uses the token's ttl to manage the refresh cycle of tokens.
> 
> Refresh cycle impl was changed from setInterval to setTimeout because if intervals are missed due to inability to schedule them (suspend/sleep/hibernate/busy)
> they will *all* be executed in order when able.
> 
> A few TODO's in the code I did not have time to address.
> One is configurable token TTL values via ContainerConfig.  Another is better managing refresh cycle when using tokens any of which may have varying expirations.
> 
> 
> This addresses bug SHINDIG-1646.
>     https://issues.apache.org/jira/browse/SHINDIG-1646
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/constant.js 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/util.js 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AbstractSecurityToken.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/BasicSecurityTokenCodec.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/BlobCrypterSecurityTokenCodec.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/DefaultSecurityTokenCodec.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/SecurityTokenCodec.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/auth/UrlParameterAuthenticationHandlerTest.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/testing/FakeGadgetToken.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerApi.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerService.java 1189191 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerServiceTest.java 1189191 
> 
> Diff: https://reviews.apache.org/r/2525/diff
> 
> 
> Testing
> -------
> 
> Tests updated to cope with interface changes.  All tests pass.
> 
> 
> Thanks,
> 
> Dan
> 
>