OAuth NullPointerException on failed query authentication after permission revoked
106 views
Skip to first unread message
n0_fixed_ab0de
unread,
Aug 17, 2009, 11:37:56 AM8/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Data Protocol, russel...@hullomail.com, ch...@hullomail.com
After revoking access permission from a domain subsequent OAuth requests to access the service from this domain results in the following:
java.lang.NullPointerException: No authentication header information at com.google.gdata.util.AuthenticationException.initFromAuthHeader (AuthenticationException.java:96) at com.google.gdata.util.AuthenticationException.<init> (AuthenticationException.java:67) at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse (HttpGDataRequest.java:563) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse (GoogleGDataRequest.java:543) at com.google.gdata.client.http.HttpGDataRequest.checkResponse (HttpGDataRequest.java:535) at com.google.gdata.client.http.HttpGDataRequest.execute (HttpGDataRequest.java:514) at com.google.gdata.client.http.GoogleGDataRequest.execute (GoogleGDataRequest.java:515) at com.google.gdata.client.Service.getFeed(Service.java:1034) at com.google.gdata.client.Service.getFeed(Service.java:976) at com.google.gdata.client.GoogleService.getFeed (GoogleService.java:662) at com.google.gdata.client.Service.query(Service.java:1136) at com.google.gdata.client.Service.query(Service.java:1077)
I was hoping to see something a bit more explicit telling the authentication request had failed.
Is this normal and what should be expected? And if so can I reliably interpret this as meaning permission has been revoked?
Thanks
n0_fixed_ab0de
unread,
Aug 18, 2009, 7:48:05 AM8/18/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Data Protocol
It looks like the header "WWW-Authenticate" is not available. Is this a bug and if so is it being looked at?
/** * Constructs a new AuthenticationException instance based upon * the contents of a WWW-Authenticate header as described by * RFC2617. */ ...... public AuthenticationException(HttpURLConnection httpConn) throws IOException { super(httpConn); initFromAuthHeader(httpConn.getHeaderField("WWW-Authenticate"));
n0_fixed_ab0de
unread,
Aug 19, 2009, 11:24:55 AM8/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Data Protocol, ch...@hullomail.com, Russel...@hullomail.com
I upgraded to version 1.0a and when revoking permission I have been receiving the following error when attempting to authorized access token Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL
This declared onhttp://code.google.com/apis/accounts/docs/OAuth_ref.html Note: The return of a verification code does not indicate that a request token has been authorized. If a request token has not been authorized, then requests to exchange it for an access token will fail.
However, instead of getting the response content ("The request token is invalid.") which can be acquired by manually trying out the request URL in a browser OAuthHttpClient.getResponse() instead throws the IOException above with the 400 code leaving the developer to fumble and debug.