You don't have to upload anything to google to make it work
"Target URL path prefix:" I used graaasp.epfl.ch (where the gadget is hosted)I don't remember generating any ssl certificate (even if I did I just followed the shindig's instructions)
On 7/6/10 20:38, Normandes Jr wrote:
what do you use at "Target URL path prefix: " google manage domains? I used this: http://lab-51.no-ip.org:8080/gadgets and try with authsub too. On Mon, Jun 7, 2010 at 3:30 PM, Normandes Jr<[email protected]> wrote:I think that it is almost working. I am getting this error: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated Do you generate certificated? How? I tried to generate this way: openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj \ '/C=US/ST=CA/L=Mountain View/CN=www.example.com' -keyout \ myrsakey.pem -out /tmp/myrsacert.pem Then I edited the file: java/common/conf/shindig.properties with the values: shindig.signing.state-key= shindig.signing.key-name=mykey shindig.signing.key-file=/opt/shindig/myrsacert.pem Then I upload the file myrsacert.pem to my account to google. Thanks a lot for your help. On Mon, Jun 7, 2010 at 11:04 AM, Evgeny Bogdanov<[email protected]>wrote:Everything works for me (I mean oauth) with revision 951000 You have to specify both security token and url: and make sure you have http:// in both url and security token. http://localhost:8080/gadgets/ifr?url=http://graaasp.epfl.ch/gadget/oauth_example.xml&st=p_4:p_4:4:default:http://graaasp.epfl.ch/gadget/oauth_example.xml:4:1 Having http:// in security token (if you don't encrypt it) will break the shindig, unless you apply this patch: https://issues.apache.org/jira/browse/SHINDIG-1334 For this gadget, you need oauth.json like this: "http://graaasp.epfl.ch/gadget/oauth_example.xml" : { "google" : { "consumer_secret" : "code_from_google", "consumer_key" : "graaasp.epfl.ch", "key_type" : "HMAC_SHA1" } }, On 07.06.10 15:44, Evgeny Bogdanov wrote:For me it is broken also. Try this version svn update --revision=951000 mvn package -Dmaven.test.skip mvn -Prun On 07.06.10 14:40, Normandes Jr wrote:At friday I was in training and today I did an update at shindig and try this URL: http://lab-51.no-ip.org:8080/gadgets/ifr?url=http://lab-51.no-ip.org:8080/samplecontainer/examples/oauth_example.xml&aid=12&mid=12&viewer=2&owner=2&st=2:2:12:default:lab-51.no-ip.org/samplecontainer/examples/oauth_example.xml:12:1 This domain is real. Now there is no error at shindig log, but nothing happens at browser. Even when I remove the security token. But I think that the problem is worse than before, because even this url: http://lab-51.no-ip.org:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xmlisn't<http://lab-51.no-ip.org:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xmlisn%27t> working. Do you know if there is some problem at trunk version? On Wed, Jun 2, 2010 at 4:28 PM, Evgeny Bogdanov<[email protected]wrote:Drop me an email on Friday. I can't do it now anymore :( Change url both in security token and&url= to the gadget xml file that I sent before (for this you need to host this gadget somewhere) Try to remove the security token You used http%3A%2F%2Flocalhost:8080%2Fsamplecontainer%2Fexamples%2FgetFriendsHasApp.xml but this is not a oAuth gadget, it is a gadget to work with opensocial On 2/6/10 21:04, Normandes Jr wrote:Thanks for your help again. I checked and I am using&url=http://... I did a debug at MakeRequestServlet and I realized that the values of SecurityToken attribute is: Object value = request.getAttribute("org.apache.shindig.auth.AuthInfo$Attribute.SECURITY_TOKEN") AnonymousSecurityToken a = (AnonymousSecurityToken) value; a.getAppId() = a.getAppUrl() = a.getAuthenticationMode() = UNAUTHENTICATED a.getContainer() = default a.getDomain() = a.getModuleId() = 0 a.getOwnerId() = -1 a.getTrustedJson() = a.getUpdatedToken() = a.getViewerId() = -1 a.getExpiresAt() = null I change your url to: http://localhost:8080/gadgets/ifr?url=http%3A%2F%2Flocalhost:8080%2Fsamplecontainer%2Fexamples%2FgetFriendsHasApp.xml&aid=12&mid=12&viewer=2&owner=2&st=2:2:12:default:shindig%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2FgetFriendsHasApp.xml:12:1 And I got this error: INFO: Returning a response error as result of a protocol exception org.apache.shindig.protocol.ProtocolException: Person '2' not found at org.apache.shindig.social.sample.spi.JsonDbOpensocialService.getPerson(JsonDbOpensocialService.java:324) at org.apache.shindig.social.opensocial.service.PersonHandler.get(PersonHandler.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.shindig.protocol.DefaultHandlerRegistry$MethodCaller.call(DefaultHandlerRegistry.java:474) at org.apache.shindig.protocol.DefaultHandlerRegistry$RpcInvocationHandler.execute(DefaultHandlerRegistry.java:300) at org.apache.shindig.protocol.DefaultHandlerRegistry$RpcInvocationWrapper.execute(DefaultHandlerRegistry.java:324) at org.apache.shindig.protocol.JsonRpcServlet.dispatchBatch(JsonRpcServlet.java:185) at org.apache.shindig.protocol.JsonRpcServlet.service(JsonRpcServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.apache.shindig.auth.AuthenticationServletFilter.callChain(AuthenticationServletFilter.java:123) at org.apache.shindig.auth.AuthenticationServletFilter.doFilter(AuthenticationServletFilter.java:86) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) On Wed, Jun 2, 2010 at 3:47 PM, Evgeny Bogdanov< [email protected]wrote:Try full url in your browser http://shindig/gadgets/ifr?url=http%3A%2F%2Fshindig%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2FgetFriendsHasApp.xml &aid=12&mid=12&viewer=2&owner=2 &st=2:2:12:default:shindig%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2FgetFriendsHasApp.xml:12:1 On 2/6/10 20:30, Normandes Jr wrote:I think that the problem is about a security token. But shindig isn't append this parameter. Do you know about this? On Wed, Jun 2, 2010 at 2:16 PM, Normandes Jr<[email protected]> wrote:I did this and didn't work yet... :( I can compile the shindig code to debug something for you, just tell me where should I insert some debug code. Do you think that can be a bug of shindig or is configuration? Thanks for you help. Normandes Junior. On Wed, Jun 2, 2010 at 4:51 AM, Evgeny Bogdanov< [email protected]wrote:Try gadget in the attachment (takes contacts from your gmail account) Add the lines below to your oauth.json. "http://path_to_your_gadget/oauth_example.xml" : { "google" : { "consumer_secret" : "you_will_get_it_from_google", "consumer_key" : "your_consumer_key_from_google", "key_type" : "HMAC_SHA1" } }, You can get the keys for google here: https://www.google.com/accounts/ManageDomains This worked perfectly for me a week or two ago On 01.06.10 21:26, Normandes Jr wrote:So, where should I start take a look to be able solve this issue? How could I know if the gadget spec is OK? On Tue, Jun 1, 2010 at 4:21 PM, Cesar William<[email protected]wrote:---------- Forwarded message ---------- From: Paul Lindner<[email protected]> Date: Tue, Jun 1, 2010 at 4:17 PM Subject: Re: Error at shindig with OAuth To: [email protected] Shindig fetches the gadget spec to pull in the<Oauth...> stanza, if your gadget spec cannot be loaded it will give that error message. Now why that's happening is another question. It could be that your gadget spec is not getting served up, or it could be a configuration issue with the shindig server you have set up (behind a proxy, dns, etc.) On Tue, Jun 1, 2010 at 12:05 PM, Normandes Jr< [email protected]wrote:Hi, Any gadget that I try to use OAuth, I get this error: WARNING: OAuth fetch fatal error OAuth error [UNKNOWN_PROBLEM, Could not fetch gadget spec] forapplication. Request trace: ==== Original request: GET /m8/feeds/contacts/default/base?alt=json Host: www.google.com X-Shindig-AuthType: oauth X-Forwarded-For: 127.0.0.1 X-shindig-dos: on ==== [UNKNOWN_PROBLEM,Could not fetch gadget spec] atorg.apache.shindig.gadgets.oauth.GadgetOAuthTokenStore.findSpec(GadgetOAuthTokenStore.java:286)atorg.apache.shindig.gadgets.oauth.GadgetOAuthTokenStore.lookupSpecInfo(GadgetOAuthTokenStore.java:129)atorg.apache.shindig.gadgets.oauth.GadgetOAuthTokenStore.getOAuthAccessor(GadgetOAuthTokenStore.java:94)atorg.apache.shindig.gadgets.oauth.OAuthRequest.fetchNoThrow(OAuthRequest.java:192)atorg.apache.shindig.gadgets.oauth.OAuthRequest.fetch(OAuthRequest.java:176)atorg.apache.shindig.gadgets.http.DefaultRequestPipeline.execute(DefaultRequestPipeline.java:92)atorg.apache.shindig.gadgets.servlet.MakeRequestHandler.doFetch(MakeRequestHandler.java:91)at org.apache.shindig.gadgets.servlet.ProxyBase.fetch(ProxyBase.java:169) atorg.apache.shindig.gadgets.servlet.MakeRequestServlet.doGet(MakeRequestServlet.java:49)atorg.apache.shindig.gadgets.servlet.MakeRequestServlet.doPost(MakeRequestServlet.java:55)at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) atorg.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)atorg.apache.shindig.auth.AuthenticationServletFilter.callChain(AuthenticationServletFilter.java:123)atorg.apache.shindig.auth.AuthenticationServletFilter.doFilter(AuthenticationServletFilter.java:86)atorg.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) atorg.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) atorg.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)atorg.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)atorg.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) atorg.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) atorg.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)atorg.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)Caused by: org.apache.shindig.gadgets.GadgetException: Url does not include scheme atorg.apache.shindig.gadgets.http.DefaultRequestPipeline.normalizeProtocol(DefaultRequestPipeline.java:133)atorg.apache.shindig.gadgets.http.DefaultRequestPipeline.execute(DefaultRequestPipeline.java:61)atorg.apache.shindig.gadgets.AbstractSpecFactory.fetchFromNetwork(AbstractSpecFactory.java:130)atorg.apache.shindig.gadgets.AbstractSpecFactory.getSpec(AbstractSpecFactory.java:90)atorg.apache.shindig.gadgets.DefaultGadgetSpecFactory.getGadgetSpec(DefaultGadgetSpecFactory.java:86)atorg.apache.shindig.gadgets.oauth.GadgetOAuthTokenStore.findSpec(GadgetOAuthTokenStore.java:281)... 32 more Cold you help me? Thanks, Normandes Junior Brazil......
