Hello,
I am struggling in extending the JOpenId library to handle the hybrid
protocol (OpenID+OAuth)
I manage to get an authorized token back after adding the OAuth
parameters to the getAuthenticationUrl() method (obviously, this works
for only for Google so far):
.append("openid.ns.ext2=
http://specs.openid.net/extensions/
oauth/1.0");
.append("openid.ext2.consumer=
contactninja.dyndns.org");
.append("openid.ext2.scope=
https://www.google.com/m8/feeds/");
Now, to get the access token I created a OAuthGetAccessToken
connexion:
int millis = (int) System.currentTimeMillis() * -1;
int time = (int) millis / 1000;
URLConnection connection
= new URL("
https://www.google.com/accounts/
OAuthGetAccessToken?"
+ "oauth_consumer_key=
contactninja.dyndns.org"
+ "&oauth_nonce=" +String.valueOf(millis)
+ "&oauth_timestamp=" + String.valueOf(time)
+ "&oauth_signature_method=HMAC-SHA1"
+ "&oauth_signature=???"
+ "&oauth_token=" + THE_AUTHORIZED_TOKEN_I_RECEIVED
+ "&oauth_version=1.0").openConnection();
BUT, I cannot figure out how to construct "&oauth_signature=???". The
description is here:
http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth
Any idea, subjection ? It would be very appreciated!
Thank you!
Philippe