It is taking quite a bit of time to nail down this issue...If I am
missing something obvious,  let me know..

I am testing both the provider and consumer on localhost..My call to
get a request token fails...

On the CONSUMER  end ..I do this..
-----------------------------------------------------------------------------------------------------------------------------------
Properties consumerProperties = new Properties();
OAuthConsumer consumer;
consumerProperties.load(in);
ConsumerProperties consumers = new
ConsumerProperties(consumerProperties);

consumer = consumers.getConsumer(consumerName);

OAuthAccessor accessor = new OAuthAccessor(consumer);

java.util.Collection<OAuth.Parameter> parameters =  null;

URL baseURL = (URL)
accessor.consumer.getProperty("serviceProvider.baseURL");

OAuthMessage request = accessor.newRequestMessage("POST", (new
URL(baseURL, "echo")).toExternalForm(), parameters);  //what is this
echo for anyway ?

-----------------------------------------------------------------------------------------------------------------------------------------------------------
the request contains the following params.... after the above code....

oauth_consumer_key  from consumer: myConsumerKey
oauth_consumer_key from request: myConsumerKey
oauth_signature_method : HMAC-SHA1
oauth_timestamp : 1270576575
oauth_nonce : 244779113802312
oauth_version : 1.0
oauth_signature : BYz7M0C4fKoFUTZjlyBDbUp8qXI=

--------------------------------------------------------------------------------------------------------------------------------------------------------------

On the PROVIDER   end ..I do this..

-----------------------------------------------------------------------------------------------------------------------------------

OAuthMessage requestMessage = OAuthServlet.getMessage(request, null);
OAuthConsumer consumer = OAuthProvider.getConsumer(requestMessage);
OAuthAccessor accessor = new OAuthAccessor(consumer);

OAuthProvider.VALIDATOR.validateMessage(requestMessage, accessor);

--------------------------------------------------------------------------------------------------------------------------------------------------------------

and I am bounced back with a signature invalid error.

net.oauth.OAuthProblemException: signature_invalid
        at
net.oauth.signature.OAuthSignatureMethod.validate(OAuthSignatureMethod.java:
68)
        at
net.oauth.SimpleOAuthValidator.validateSignature(SimpleOAuthValidator.java:
254)
        at
net.oauth.SimpleOAuthValidator.validateMessage(SimpleOAuthValidator.java:
148)

If there is something very obvious that I am messing up with , let me
know.

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

Reply via email to