You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Ryan Baxter <rb...@gmail.com> on 2013/05/10 16:15:50 UTC

Re: Review Request: value of oauth_expires_in returned from server is 0 should be respected as oauth expire unknown

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

Ship it!


LGTM.  I agree with Marshall I would like a JIRA for this.

- Ryan Baxter


On March 5, 2013, 7:37 a.m., Zhi Hong Yang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9747/
> -----------------------------------------------------------
> 
> (Updated March 5, 2013, 7:37 a.m.)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and Rich Thompson.
> 
> 
> Description
> -------
> 
> In org.apache.shindig.gadgets.oauth.OAuthRequest.java:
>     accessorInfo.setTokenExpireMillis(ACCESS_TOKEN_EXPIRE_UNKNOWN);
>     if (OAuthUtil.getParameter(reply, OAuthConstants.OAUTH_EXPIRES_IN) != null) {
>       try {
>         int expireSecs = Integer.parseInt(OAuthUtil.getParameter(reply,
>             OAuthConstants.OAUTH_EXPIRES_IN));
>         if (expireSecs > 0) {
>           long expireMillis = fetcherConfig.getClock().currentTimeMillis() + expireSecs * 1000L;
>           accessorInfo.setTokenExpireMillis(expireMillis);
>         }  
> 
> if expireSecs is 0, the TokenExpireMillis value of accessInfo should be remained as ACCESS_TOKEN_EXPIRE_UNKNOWN.
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth/OAuthRequest.java 1452675 
> 
> Diff: https://reviews.apache.org/r/9747/diff/
> 
> 
> Testing
> -------
> 
> No Test Case has been added
> 
> 
> Thanks,
> 
> Zhi Hong Yang
> 
>