[oauth] Re: Keep Getting an Unauthorized Exception

2010-02-18 Thread Yefei
Hi John,

  Thanks for answering my questions and I did modify my code, i.e, I
don't add oauth_token parameter to params and I don't set
accessor.requestToken( I suppose this is what you mean), anyways, I
still get an Unauthorized exception.

02-18 04:00:44.308: WARN/System.err(352):
net.oauth.OAuthProblemException: HTTP/1.1 401 Unauthorized
02-18 04:00:44.308: WARN/System.err(352): at
net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:
83)
02-18 04:00:44.308: WARN/System.err(352): at
net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
02-18 04:00:44.318: WARN/System.err(352): at
net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
02-18 04:00:44.318: WARN/System.err(352): at
com.yefei.scanner.back.db.DBProvider.accessProtectedMeterial(DBProvider.java:
170)
02-18 04:00:44.318: WARN/System.err(352): at
com.yefei.scanner.front.ui.MyProfileActivity
$2.run(MyProfileActivity.java:57)

I got stuck on this. I tried to trace the code during the debug mode
but I am pretty new to this and just got lost. Is there something that
I can print out because it has some useful information in it? ( I am
very sure my app is authorized since I can see them in authorized app
under my profile of that website) Any help is greatly appreciate!

Thanks in advance


On Feb 13, 5:55 pm, John Kristian jmkrist...@gmail.com wrote:
 Don't add an oauth_token parameter to params.  OAuthClient.invoke will
 do that for you.

 It's not necessary to set accessor.tokenSecret, if you set the
 accessToken and tokenSecret.  In this case, accessor.tokenSecret
 should be the secret that the service provider sent with the access
 token.

-- 
You received this message because you are subscribed to the Google Groups 
OAuth group.
To post to this group, send email to oa...@googlegroups.com.
To unsubscribe from this group, send email to 
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.



[oauth] Re: 400 Bad Request?

2010-02-18 Thread dj
Hi Robert,

Thanks for the information. I do get some information printed from the
caught OAuthProblemException. It is printed below. Looks like
something related to the timestamp being refused? I tried searching
for the timestamp refused error, and it seems like you're supposed to
be setting the current time in the oauth client somehow, I don't know
if that's true, or if it is, where would we do that?:


HTTP response: HTTP/1.1 400 Bad Request
Server: nginx/0.7.64
Date: Thu, 18 Feb 2010 18:56:17 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
Content-Length: 70
X-Lift-Version: 2.0-M2

TIMESTAMP_REFUSED (oauth_acceptable_timestamps: 1266519077-1266519677)
URL:
http://thesite.com/oauth/request_token?oauth_consumer_key=xoauth_signature_method=HMAC-SHA1oauth_timestamp=1266530170oauth_nonce=71507272567oauth_version=1.0oauth_signature=ulBLMuMJP%2Be0a8M9d2WM6HruDa0%3D
HTTP request: GET /oauth/request_token?
oauth_consumer_key=xoauth_signature_method=HMAC-
SHA1oauth_timestamp=1266530170oauth_nonce=71507272567oauth_version=1.0oauth_signature=ulBLMuMJP
+e0a8M9d2WM6HruDa0=


Thanks



On Feb 16, 3:09 pm, Robert Winch rwi...@gmail.com wrote:
 According to the OAuth spec a 400 occurs when a Service Provider rejects a
 Consumer Request. Some of the examples they outline are Unsupported
 parameter, Unsupported signature method, Missing required parameter, ...
 Since the code is working against another provider I'd consult the doc for
 this specific provider to see what they expect (i.e. maybe they only support
 PLAINTEXT signatures). If the service provider sends error info back in the
 response, you can change your code as follows to get some additional data.

 try {
   client.getRequestToken(accessor);}catch(OAuthProblemException e) {

   System.err.println(e.getParameters());
   throw e;

 }

 HTH,
 Rob



 On Tue, Feb 16, 2010 at 4:25 PM, dj dj.am.juice...@gmail.com wrote:
  Hi,

  I'm trying to use oauth on Android, going along with this excellent
  tutorial on how to do it:

   http://donpark.org/blog/2009/01/24/android-client-side-oauth

  it works for twitter. Now I just replaced the urls, key and secret, to
  point to a different third party OAuth service I want to use. I get
  the following exception thrown:

  net.oauth.OAuthProblemException: HTTP/1.1 400 Bad Request
   at net.oauth.client.OAuthClient.invoke(OAuthClient.java:257)
   at net.oauth.client.OAuthClient.invoke(OAuthClient.java:160)
   at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:
  101)
   at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:77)
   at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:
  110)

  Here's the code I'm using:

  OAuthServiceProvider provider = new OAuthServiceProvider(
   urlRequestToken,
   urlAccessToken,
   urlAuthorize);

  OAuthConsumer consumer = new OAuthConsumer(
   urlCallback,
   consumerKey,
   consumerSecret, provider);
  OAuthAccessor accessor = new OAuthAccessor(consumer);
  OAuthClient client = new OAuthClient(new HttpClient4());

  // Exception:
  client.getRequestToken(accessor);

  I'm sure my key and secret are correct, and my urls are pointing to
  the correct locations. Is the third party implementation of OAuth
  (server-side) the cause of this? It is working for twitter and linked-
  in. Any ideas would be great,

  Thanks

  --
  You received this message because you are subscribed to the Google Groups
  OAuth group.
  To post to this group, send email to oa...@googlegroups.com.
  To unsubscribe from this group, send email to
  oauth+unsubscr...@googlegroups.com oauth%2bunsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/oauth?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
OAuth group.
To post to this group, send email to oa...@googlegroups.com.
To unsubscribe from this group, send email to 
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.



[oauth] 3-legged OAuth without application registration

2010-02-18 Thread zemi
Hi everybody,
I need a consumer to request (3-legged) 'request' tokens without
previous registration on provider side.
I've noticed Google and Plaxo support this with 'anonymous' consumer
key? How exactly is this then handled on provider side? Do they create
token only or consumer key also?
Thanks for help folks!

Regards,
zemi

-- 
You received this message because you are subscribed to the Google Groups 
OAuth group.
To post to this group, send email to oa...@googlegroups.com.
To unsubscribe from this group, send email to 
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.



Re: [oauth] Re: Signature Invalid and Token Rejected Errors-Yahoo Oauth Social API using Javascript, Getting contacts from Yahoo using Social API by OAUTH

2010-02-18 Thread redrose
sir,

my google certificate problems solved now
so, dont send any message to me

-- 
You received this message because you are subscribed to the Google Groups 
OAuth group.
To post to this group, send email to oa...@googlegroups.com.
To unsubscribe from this group, send email to 
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.