简体   繁体   English

Shindig-无法获取小工具规范(安全令牌?)

[英]Shindig - Could not fetch gadget spec (security tokens?)

I'm working with shindig trying to get some OAuth1 gadgets working outside any container (using the gadgets/ifr thing). 我正在与shindig合作,尝试使某些OAuth1小工具在任何容器外工作(使用小工具/ ifr东西)。

I've been using the 'gadget testing container' and everything works just fine, which means every key is setted correctly on the oauth.json. 我一直在使用“小工具测试容器”,并且一切正常,这意味着每个密钥都已在oauth.json上正确设置。

The problem begins when I try to display those same gadgets outside the container. 当我尝试在容器外部显示相同的小工具时,问题就开始了。 I get this error: 我收到此错误:

OAuth error: UNKNOWN_PROBLEM: Could not fetch gadget spec
==== 
Original request: 
GET stuff.json 
Host: my.host 
X-Shindig-AuthType: oauth 
X-Forwarded-For: 127.0.0.1 
X-shindig-dos: on
====

The url I use is something like this: 我使用的网址是这样的:

http://localhost:8080/gadgets/ifr?url=http://my.host/stuff.xml

I thing the problem here has some relation with the &st parameter (security token)... 我觉得这里的问题与&st参数(安全性令牌)有关。

For the record, if I use some already provided gagdet by shindig it works without any problems (those are OAuth2.0 though): 作为记录,如果我使用shindig提供的一些gagdet,它可以正常工作(尽管它们是OAuth2.0):

http://localhost:8080/gadgets/ifr?url=http://localhost:8080/samplecontainer/examples/oauth2/oauth2_facebook.xml

I've been searching this question and lots of people have this same problem but no answers. 我一直在搜索这个问题,很多人都遇到同样的问题,但没有答案。 I think this could be the place they're looking for :D 我认为这可能是他们正在寻找的地方:D

Ok, for those who has my same problem, this is how I managed to fix it. 好吧,对于那些遇到相同问题的人,这就是我设法解决的方法。

As you can see I was trying to render the widget through the basic ifr url. 如您所见,我正在尝试通过基本的ifr url呈现窗口小部件。 That's not how shindig works. 那不是shindig的工作方式。 It needs some javascript to render the content you need. 它需要一些JavaScript来呈现所需的内容。

What did I do? 我做了什么 I simply created a custom 'container', it receives an url param with the gadget xml's url and, through javascript, I render that gadget. 我只是创建了一个自定义的“容器”,它接收带有小工具xml的url的URL参数,并通过javascript渲染该小工具。

The javascript I'm using is the one wich comes in shindig (samplecontainer/samplecontainer.js) with basics modifications. 我正在使用的javascript是shindig(samplecontainer / samplecontainer.js)附带的一个基本修改内容。

Hope this works... It's not easy though >.< Grettings!!1one 希望这行得通...虽然不容易>。<Grettings !! 1one

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM