- 浏览: 227273 次
- 性别:
- 来自: 深圳
-
文章分类
- 全部博客 (212)
- 架构师-01-文档目录 (3)
- 架构师-02-组织 (7)
- 架构师-03-实施 (35)
- 架构师-04-监督 (14)
- 架构师-05-工具 (29)
- 架构师-09-引用文集 (63)
- 专题-01-微博应用 (5)
- 专题-02-GoogleEarth (1)
- 专题-03-运行维护 (9)
- 专题-04-经纪人营平 (3)
- 专题-05-RCP&RAP (5)
- 专题-06-框架PK (3)
- 专题-07-Android (13)
- 专题-08-UI (3)
- 专题-liferay6 (6)
- 专题-extjs4 (3)
- 专题-CXF (3)
- 专题-封闭网络的社会化 (0)
- 扯谈 (4)
- 外包 (9)
- 专题-C++ (4)
- 专题-09-BI (2)
- jquery&easyui (2)
- 专题-搜索引擎 (1)
最新评论
-
brighter:
oMapper.configure(Deserializati ...
jackson 抛出 bean 中没有定义字段的错误,只好用 gson -
PassFeed_free:
public Bitmap decode(ImageDecod ...
android universalimageloader 几点改进 -
PassFeed_free:
楼主你好, 请问这个库, 在大屏显示高清图片 ,listvie ...
android universalimageloader 几点改进 -
yonghong:
楼主只是揣测
JIRA4.1 升级到 JIRA5.1 -
abdxj:
"Could NOT parse license t ...
JIRA4.1 升级到 JIRA5.1
引用说明:原文来自于http://djb4ke.iteye.com/blog/654426,为了方便本人阅读,文本格式略有调整。
Apache Shindig homepage 实验0:Shindig初体验 部署应用: 1:下载最新的war包 http://shindig.apache.org/download/index.html (目前版本http://repo2.maven.org/maven2/org/apache/shindig/shindig-server/1.1-BETA5-incubating/shindig-server-1.1-BETA5-incubating.war) 2:将war包copy到 $TOMCAT_HOME/webapps下 3:修改$TOMCAT_HOME/conf下的server.xml文件 4:启动tomcat后,打开浏览器测试一下:http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml 效果如下: 5:有了gadget容器,我们可以尝试着render各种gadget 下面的网址是个gadget的目录,view details后copy gadget的xml源代码附加到http://localhost:8080/gadgets/ifr?url=后面。 http://directory.opensocial.org/gadgets/directory?synd=cad 这里贴几个我试验过的gadget: http://www.labpixies.com/campaigns/sudoku/sudoku.xml&source=lpep http://graargh.returnstrue.com/lane/opensocial/v09/mashup/gifts.xml http://hosting.gmodules.com/ig/gadgets/file/100080069921643878012/myspace.xml http://warmbrain.com/gadgets/flickr.xml 实验1:下载最新的Build包进行编译运行调试 http://shindig.apache.org/developers/java/build.html 编译源代码:mvn ※关于maven参数的ref:https://cwiki.apache.org/WICKET/maven-jetty-plugin.html 运行Jetty服务器 : mvn -Prun http://oauth.googlecode.com/svn/spec/ext/consumer_request/1.0/drafts/1/spec.html Container: http://localhost:8080/samplecontainer/samplecontainer.html OpenSocial Dev App (hyves): http://osda.appspot.com/gadget/osda-hyves.xml Google calendar http://www.google.com/ig/modules/calendar3.xml http://localhost:8080/gadgets/ifr?url=http://www.google.com/ig/modules/calendar3.xml 中国Containter List http://wiki.opensocial.org/index.php?title=Resources_for_migration_to_Chinese_containers Social Site http://incubator.apache.org/projects/socialsite.html 两篇很有价值的问题,探讨Opensocial结合OAuth的应用: 这个应用很独特,在Social Network中,比如Facebook,添加一个Gadget后(假设javaeye支持),可以在facebook中通过这个Gadget可以得到javaeye blog的Data,可以发文章到javaeye。 http://rollerweblogger.org/roller/entry/oauth_everywhere http://rollerweblogger.org/roller/entry/oauth_everywhere_continued 需要关注的web应用 http://www.ning.com Enable OAuth in Shindig https://cwiki.apache.org/confluence/display/SHINDIG/Enabling+OAuth+support 实验:在Shindig上跑OAuth,Gadget访问Shindig 为了跑完整的OAuth流程,我们需要在Server端保存gadget的key和secret 打开文件 %SHINDIG_ROOT%/target/work/webapp/WEB-INF/classes/config/oauth.json 这个文件就是OAuth的配置文件,因为我们要run的是Shindig默认的OAuth例子,所以这里已经定义好了,如果以后要自己要添加在,仿照着加进去即可。 同时,我们还需要生成server端自己的key: Step1:到链接处下载Openssl,http://www.slproweb.com/products/Win32OpenSSL.html Step2:用下面两个命令可以生成key openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem -out testkey.pem -subj '/CN=mytestkey' openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM Step3:编辑SHINDIG_ROOT/java/conf/shindig.properties文件 为shindig.signing.key-name和shindig.signing.key-file属性赋值 shindig.signing.key-file是你存放oauthkey.pem的位置。 保存后需要重新编译shindig,比较清爽的做法: step1 : mvn clean step2 : mvn(或者可以忽略test,用mvn -Dmaven.test.skip=true) 编译完成后启动Shindig mvn -Prun oauth.xml 打开浏览器: 进入Shindig默认测试container:http://localhost:8080/samplecontainer/samplecontainer.html 在Displaying gadget输入: http://localhost:8080/samplecontainer/examples/shindigoauth.xml 点击reset all后会render出gadget。 点击Button后会进行Oauth的flow. 问题:Gadget的OAuth参数实在何处保存的: 从表面来看,这仿佛是gadget和SHINDIG两者间的交互。 但是如果稍微深入想想,Gadget被Render出来后只是HTML,不通过server,怎么能发出OAuth这么复杂的request呢,而request当然也不可能是被Gadget正在访问的服务发的(自己验证自己多没意义╮(╯_╰)╭)。那这到底是怎么做的呢? 所以提出这个问题的原因是,如果没仔细看过spec,如果也没觉得费解,就会产生两者在交互的误解。 而且此时的环境是我单独运行的Shindig,用的gadget也是shindig自带的,似乎一切都在shindig中完成,并没有OAuth中consumer和service provider的概念,如果不把Gadget当做cousumer,就更加费解了.. 为了说明这个问题,首先引入Shindig OAuth的Flow Gadget
(此步骤必须做,因为Shindig调用一些内部的 API,URL都是访问域的根目录):
找到<HOST/>节点,添加<Context docBase="shindig-server-1.1-BETA5-incubating" path="" workDir="work\Catalina\localhost\shindig-server-1.1-BETA5-incubating" reloadable="true"/>参照官网build新包和设置了Eclipse编译环境
Java version: 1.6.0_17
Java home: C:\Program Files\Java\jdk1.6.0_17\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
<maven.compile.deprecation>off</maven.compile.deprecation>
简单介绍:这里打开的debug端口是8000,suspend为no时,除非debug断点中断,如果没有调试器设置断点,server运行与普通运行时一样
"shindig" : {
"consumer_key" : "http://localhost:8080/samplecontainer/examples/shindigoauth.xml",
"consumer_secret" : "secret",
"key_type" : "HMAC_SYMMETRIC"
}
}
ey.pem -out testkey.pem -subj '/CN=mytestkey'
Loading 'screen' into random state - done
Generating a 1024 bit RSA private key
.....++++++
........................++++++
writing new private key to 'testkey.pem'
-----
Subject does not start with '/'.
problems making Certificate Request
C:\OpenSSL\bin>openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -
outform PEM
### Outbound OAuth support
shindig.signing.state-key=
shindig.signing.key-name=mykey
shindig.signing.key-file=C://OpenSSL//bin//oauthkey.pem
shindig.signing.global-callback-url=http://localhost:8080/gadgets/oauthcallback
shindig.signing.enable-signed-callbacks=true
........
Host: 127.0.0.1:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.335.1 Safari/533.1
Referer: http://127.0.0.1:8080/gadgets/ifr?container=default&mid=0&nocache=0&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Flocalhost%3A8080&st=john.doe%3Ajohn.doe%3A6114%3Ashindig%3Ahttp%253A//localhost%253A8080/samplecontainer/examples/shindigoauth.xml%3A0%3Adefault&url=http%3A%2F%2Flocalhost%3A8080%2Fsamplecontainer%2Fexamples%2Fshindigoauth.xml
Content-Length: 521
Origin: http://127.0.0.1:8080
Content-Type: application/x-www-form-urlencoded
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: __utmz=96992031.1272262237.1.1.utmcsr=localhost:8080|utmccn=(referral)|utmcmd=referral|utmcct=/samplecontainer/samplecontainer.html; __utma=96992031.311100061.1272262237.1272262237.1272262237.1; __utmv=96992031.container%2Fshindig
POST Data:
url http://localhost:8080/social/rest/people/@me/@self
st john.doe:john.doe:6114:shindig:http%3A//localhost%3A8080/samplecontainer/examples/shindigoauth.xml:0:default
signViewer true
signOwner true
postData
OAUTH_SERVICE_NAME shindig
oauthState
numEntries 3
httpMethod GET
headers
getSummaries false
getFullHeaders false
gadget http://localhost:8080/samplecontainer/examples/shindigoauth.xml
contentType TEXT
container default
bypassSpecCache 0
authz oauth
Authorization: OAuth oauth_callback="http://localhost:8080/gadgets/oauthcallback?cs=DrcUT0ehRxQ0NOrOWaX1W8R5FTVx1nhYmIPjbsVN8rqayhBlVACrTEzM%2F31RZAhsgHGjulkPfcEeC5ohKK%2BFRJseFhIWoNm5RLO%2FS524PnbPzgEswAITYX0dGHAAL8D5hNAVfpyjCuwN%2BK2F3MwddjBjRbI%3D",
opensocial_owner_id="john.doe",
opensocial_viewer_id="john.doe",
opensocial_app_id="6114", opensocial_app_url="http://localhost:8080/samplecontainer/examples/shindigoauth.xml",
oauth_version="1.0",
oauth_timestamp="1272366999",
oauth_consumer_key="http://localhost:8080/samplecontainer/examples/shindigoauth.xml",
oauth_signature_method="HMAC-SHA1",
oauth_nonce="97398594831985",
oauth_signature="/TMZ0kErj5W0v1YzuieRxzN3rdE="
X-shindig-dos: on
Host: localhost:8080
Connection: Keep-Alive
User-Agent: Apache Shindig
Content-Type: text/plain
Expires: Tue, 27 Apr 2010 11:16:39 GMT
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 134
Server: Jetty(6.1.22)
oauth_token=b57e1ba2-9eb7-49aa-8a44-89ccf4d6cace&oauth_token_secret=f615ed6a-2fc3-45d9-92bf-9b57a7f1f935&oauth_callback_confirmed=true
发表评论
-
深入理解Java:SimpleDateFormat安全的时间格式化
2014-06-26 01:45 461原文引用自:http://www.cnblogs.com/p ... -
注册MS CRM 2011 online
2014-04-24 00:38 506http://www.cnblogs.com/StoneGa ... -
微信架构推测
2013-08-06 09:45 1337原文:http://wenku.baidu.com/vie ... -
arc-04-10-手机应用的性能测试
2013-01-05 15:01 679手机性能测试的工具一大堆,但专门针对开发手机应用的性能测试工 ... -
GraphicsMagick 介绍及安装
2012-12-26 16:56 1239引用说明:原文来自 http://paris8.org/a/b ... -
在windows系统中生成数字证书-V3
2012-12-10 16:43 1056引用说明:原文来自 http://zhouyongqiang. ... -
如何从最大用户并发数推算出系统最大用户数
2012-11-19 14:52 1415引用说明:原来来自 ht ... -
使用JIRA搭建企业问题跟踪系统
2012-07-20 09:33 0原文来自:http://www.blogjava.net/zh ... -
Eclipse rcp/rap 开发经验总结
2012-01-11 23:48 1261有牛人将 Eclipse RCP & RAP 开发经验 ... -
VMware Server 在 CentOS 下的安装与配置
2012-01-08 09:46 1097引用说明:原文来 ... -
rdesktop:Linux 下的远程桌面客户端
2012-01-07 11:37 943引用说明:原文来自于 http://blog. ... -
解决 Oracle 11g存在密码过期问题
2012-01-04 09:52 795引用说明:原文来自 ... -
角色权限,RBAC
2011-12-27 23:00 869引用说明:原文来 ... -
Spring Security 2 配置精讲
2011-12-12 20:10 775引用说明:原文来 ... -
Linux下Mongodb的分布式分片群集(sharding cluster)配置
2011-12-12 09:45 823引用说明:原文来自于http://www.linux ... -
使用 JReble 实现 tomcat 热布署
2011-11-24 09:42 2093甚至有人为了实现热部署,放弃各种框架(struts, spri ... -
基于MongoDB的好友消息动态的实现思路
2011-10-18 13:45 1550引用说明:原文来自 ... -
Linkedin网站技术架构简介
2011-10-11 14:41 1211引用说明:原文来 ... -
微薄后台架构浅析
2011-10-11 14:00 779引用说明:原文来自于http://blog.sina.c ... -
通过 Flick 看数据库集群
2011-09-19 14:14 829原文参见 http://www.cchere.com/arti ...
相关推荐
**OpenSocial Java版Shindig使用Jar包** OpenSocial 是一个开放的标准,旨在定义一套API,使得社交网络应用可以跨平台运行。Java版的Shindig是实现OpenSocial规范的一个开源实现,它提供了服务器端的基础设施,使得...
Shindig是一个开源项目,主要用于实现OpenSocial标准,它提供了一个服务器端的框架,用于构建社交网络应用。在这个过程中,Shindig允许开发者扩展其功能,以满足特定的应用需求。本文将详细介绍如何在Shindig中新增...
Java 版 Shindig 是 OpenSocial 的实现之一,它提供了一个服务器端的框架,使得开发者可以使用 Java 语言开发这些社交应用程序。Shindig 也被称为 Apache SocialSite,它实现了 OpenSocial 规范中的各种 API,包括 ...
适用于Chrome的Shindig屏幕共享扩展程序 Shindig是一个视频聊天平台,可同时容纳多达1,000名参与者。 Shindig可让您与活动参与者聊天,向主要演讲者提问,亲自向观众展示,加入视频组并进行聊天以进行协作,在私人...
Apache Shindig是一个...通过深入学习和分析Apache Shindig的源码,你不仅可以掌握AES加密在实际项目中的应用,还能提升你的Java开发技能,以及对大型开源项目组织和架构的理解。这将对你在IT领域的职业发展大有裨益。
这个"Opensocial Sample"项目提供了一个学习和实践OpenSocial技术的平台。它由Google发起,旨在创建一种通用的、跨平台的方法,使得开发者可以在各种社交网站上开发和部署应用程序,而无需为每个平台单独编写代码。 ...
它不仅提供了一套通用API,还通过Shindig这样的参考实现降低了开发者的学习成本。随着技术的发展,OpenSocial将继续进化,为开发者带来更多便利。对于那些希望在多个社交平台上快速部署应用的企业和个人来说,...
GroupWyze允许用户在单个页面上创建事件,shindig,视频群聊,聚会,音乐会,欢乐时光,团队建设和一般的恶作剧。 朋友,家人,同事和熟人可以对特定事件的细节进行投票,以使民主化并最大程度地提高乐趣! 然后,...
学习OpenSocial API不仅可以让你构建出有趣的社交应用,还能提升你在社交网络开发领域的专业技能,为你的职业生涯增添亮点。随着社交网络的持续发展,OpenSocial的应用场景将更加广泛,掌握这一技术无疑是为未来做好...
#Shindig警长管理事件的应用程序。 ##最小可行产品供组织者和财务批准者使用。 组织者可以添加,删除和编辑组织和事件。 组织者可以增加和减少活动费用。 财务批准者可以确认已收到收入,并且可以批准或拒绝组织者...
近年来,IBM继续推动开源技术的发展,对KVM、oVirt和Open Virtualization Alliance的支持,以及对Apache Shindig、Apache Hadoop(作为IBM BigInsights的一部分)、Eclipse Orion、Lyo、Paho、OpenJDK、Apache ...
例如,文档提到了参考了shindig的缓存类和apc,这意味着开发者可以借鉴shindig项目中的缓存设计思路,或者直接复用其中的某些缓存实现代码。 在实际应用中,开发者需要根据具体需求和环境选择合适的缓存策略。例如...