write client with oauth2
I download sparklr and tonr app M6 and was able to connect with tonr to sparklr and then i tried https://code.google.com/oauthplayground/
and ilogin gand authorized and it failed i get the code but the token not created
OAuth Client ID:tonr
OAuth Client secret:secret
what am i Missing here ?
Maybe you could describe in a bit more detail what you did, and what the purpose of the google link you posted is? I don't immediately see a connection with sparklr2.
The google link is oauth2 web client for test.
I want write spring mvc project with oauth like sparklr and web client to get info from the app, start by set up sparklr and tonr next i try the link to Study how to call aouth2 from web but when i use the link it failed to get the token.
Isn't the google link a client app for testing Google API resources, and learning about the exchange of codes and tokens specifically in their system? It should obtain a Google access token for you if you have a Google account. I don't see how it is relevant to sparklr2.
The google link is also for testing 3rd party OAuth 2.0 apps . You can see configure other parties by clicking on the Settings icon on the top right.
This link also explains that it can be used by 3rd party:
http://www.readwriteweb.com/hack/2012/03/google-adds-new-toys-to-oauth.php?utm_source=feedburner&utm_medium=feed&ut m_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29 .
I got it to work with sparklr2: i can login and get authorized (code is created) but the token isn't. I am not sure what is wrong. Can you help me? Do you need any other info from me?
A side note, I could not find any other simple tools to work with server side OAuth 2.0. This looks like a great way. Do you have alternative suggestions? If not, I recommend to let others know about it as well.
Yes, the tool looks like it might be quite nice for learning about OAuth2. But no point publicising it yet if it doesn't work. Where did you deploy sparklr2? It isn't going to work if you use localhost, is it, because the client app needs to be able to contact the token endpoint?
I tried it with a cloudfoundry deployment and it breaks with a 401 on the token endpoint anyway, because it is not sending the client credentials in the right form (in the header). So the Google client app is broken I would say. I think sparklr2 has the clientCredentialsTokenEndpointFilter defined in it's application context, but not in web.xml - if you add the filter to web.xml it might work.
I deploy sparklr2 on my computer with localhost i will try to call it from another computer and see what happend .
what filter to add the xml?
OK, I deployed sparklr2 from s2-oauth master, with the addition of the client request token filter. It's here: http://dsyersparklr2.cloudfoundry.com/, and it works fine with the Google playground app.
I added this to my web.xml: