You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Wenjun Wu <ww...@ci.uchicago.edu> on 2008/09/23 00:01:03 UTC
problem in running oauth.xml example
Hello everyone,
I tried to run the oauth.xml in shindig package. But it always gives
me such an exception:
org.apache.shindig.gadgets.GadgetException
at
org.apache.shindig.gadgets.servlet.MakeRequestHandler.extractAndValidateToken(MakeRequestHandler.java:240)
at
org.apache.shindig.gadgets.servlet.MakeRequestHandler.fetch(MakeRequestHandler.java:86)
at
org.apache.shindig.gadgets.servlet.MakeRequestServlet.doGet(MakeRequestServlet.java:55)
at
org.apache.shindig.gadgets.servlet.MakeRequestServlet.doPost(MakeRequestServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
It seems that MakeRequestHandler expects some security token from the
gadgets.io.RequestParameters.
Could anyone kindly point out how I can set the security token in the
RequestParameters?
Thanks!
Wenjun
Re: problem in running oauth.xml example
Posted by Brian Eaton <be...@google.com>.
On Mon, Sep 22, 2008 at 3:01 PM, Wenjun Wu <ww...@ci.uchicago.edu> wrote:
> It seems that MakeRequestHandler expects some security token from the
> gadgets.io.RequestParameters.
> Could anyone kindly point out how I can set the security token in the
> RequestParameters?
It gets inserted automatically based on the security token provided
when the gadget is rendered.
Here are instructions on how to see the oauth.xml demo gadget run.
Launch the example service provider from oauth.net:
a) svn co http://oauth.googlecode.com/svn/code/java java
b) cd java/example/oauth-provider
c) mvn jetty:run-war
Launch Shindig
Point browser at
http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html
Display gadget http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml.
Click "reset all", then hit the browser reload button (yet another bug
in the sample container)
At this point you *should* see a "Personalize this gadget" link.
Click it, and a popup to the oauth.net demo service provider opens.
Enter a user name there ("hello oauth!"), then click "Authorize".
The popup window closes, and your user id shows up in the oauth demo gadget