You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Zhi Hong Yang <zh...@cn.ibm.com> on 2013/03/05 08:32:28 UTC

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/
-----------------------------------------------------------

Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and Rich Thompson.


Description
-------

In OauthRuest.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
-------


Thanks,

Zhi Hong Yang


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

Posted by Ryan Baxter <rb...@gmail.com>.
-----------------------------------------------------------
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
> 
>


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

Posted by Zhi Hong Yang <zh...@cn.ibm.com>.

> On March 7, 2013, 4:49 a.m., Marshall Shi wrote:
> > LGTM.
> > ZhiHong, could you create a JIRA for it and brief describe how you encounter this issue? This could be useful info to be included in Shindig release note.

Just a code bug, no need a JIRA to introduce it. 


- Zhi Hong


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


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
> 
>


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

Posted by Marshall Shi <sh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9747/#review17513
-----------------------------------------------------------


LGTM.
ZhiHong, could you create a JIRA for it and brief describe how you encounter this issue? This could be useful info to be included in Shindig release note.

- Marshall Shi


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
> 
>


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

Posted by Zhi Hong Yang <zh...@cn.ibm.com>.
-----------------------------------------------------------
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 (updated)
-------

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


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

Posted by Zhi Hong Yang <zh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9747/
-----------------------------------------------------------

(Updated March 5, 2013, 7:36 a.m.)


Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and Rich Thompson.


Description
-------

In OauthRuest.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 (updated)
-----

  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


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

Posted by Zhi Hong Yang <zh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9747/
-----------------------------------------------------------

(Updated March 5, 2013, 7:33 a.m.)


Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and Rich Thompson.


Description
-------

In OauthRuest.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 (updated)
-------

No Test Case has been added


Thanks,

Zhi Hong Yang