zilzar / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Nickname request with 2-legged Oauth returns Unauthorized #655

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a nickname for a user.
2. Create a GOAuthRequestFactory and apply to an AppsService with 
SetRequestFactory()
3. Test connection and credentials with appsService.RetrieveUser(userName) - it 
works
4. Test with appsService.RetrieveNicknames(UserName)
5. Receive following error:
+ FullyQualifiedErrorId : System.Net.WebException: The remote server returned 
an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at Google.GData.Client.GDataRequest.Execute()

What is the expected output? What do you see instead?
-Expected would be a nicknameFeed object. I see an error instead.

What version of the product are you using? On what operating system?
-Windows 7, gData release 2.1.0.0 (most recent)

Please provide any additional information below.
-If I run the same set of commands using Username and Password to authenticate 
instead of OAuth (so, using the constructor for AppsService to add in domain, 
email and password) it works fine.

-If I instead set up a nickService, add the RequestFactory (setting the Request 
Factory property instead of using setUserCredentials() ), build a 
NicknameQuery, set the query.UserName property and then do 
nickService.Query(query), I get the same error.

-If I instead set up a nickService, add credentials using setUserCredentials(), 
everything works as expected.

Original issue reported on code.google.com by squid...@gmail.com on 22 Mar 2013 at 3:58