04-WebFinger的利用 | 02.技术预研 | Social
04-WebFinger的利用
郑昀 201005 隶属于《02.技术预研》小节
Kuber 的 SocialBadge 还利用了 WebFinger ,从而可以根据用户输入的 Email 地址获取它的关联信息。当然 Kuber 还是走 Social Graph 来得到关联信息,因为 WebFinger 的数据能被 Social Graph 调用。
什么是 WebFinger ?
Finger 是个UNIX指令,在Unix系统下输入 finger email@domainname.com 就可以知道和该Email账户相关的信息。可以理解为Finger 指令是在网络发展初期,用Email帐号来作为每个网民的网上身份证的一种尝试。
WebFinger 的目的是什么呢?那就是通过使用户能将元数据信息附加其中,从而让现存的Email地址更具价值。元数据包括如下内容:
* 想要公开的个人资料
* 指向ID提供商的链接(比如 OpenID server)
* 公共密匙
* 以此Email地址为ID的其他服务 (比如 Flickr, Picasa, Smugmug, Twitter, Facebook的所有服务的用户名)
* 指向一个网络身份的URL地址
* 个人数据资料 (昵称,姓名等)
* 甚或是一个不包含公共元数据的,但仅仅包含一个指向包含元数据终端的链接。
Google推出WebFinger的目的,就是要让你的email更有用,使之成为一种以email为中心的OpenID。
WebFinger 现已融入 Google 各种 Social API
可以在Buzz API Doc里发现 WebFinger 的踪影。Buzz API FAQ里说道:计划引入『distributed profile and contact information with WebFinger』。Google的人也说过:『
We've now enabled WebFinger for all gmail/google profiles with public profiles.
』
Google Webfinger 的查询地址是:
http://www.google.com/s2/webfinger/?q=acct%3Azhengyun%40gmail.com
即传入关键词为:“acct:foo@example.com”。acct 代表 account 。
上面这个查询的返回是:
<?xml version='1.0'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
<Subject>acct:zhengyun@gmail.com</Subject>
<Alias>http://www.google.com/profiles/zhengyun</Alias>
<Link rel='http://portablecontacts.net/spec/1.0' href='http://www-opensocial.googleusercontent.com/api/people/'/>
<Link rel='http://portablecontacts.net/spec/1.0#me' href='http://www-opensocial.googleusercontent.com/api/people/110589389080388532670/'/>
<Link rel='http://webfinger.net/rel/profile-page' href='http://www.google.com/profiles/zhengyun' type='text/html'/>
<Link rel='http://microformats.org/profile/hcard' href='http://www.google.com/profiles/zhengyun' type='text/html'/>
<Link rel='http://gmpg.org/xfn/11' href='http://www.google.com/profiles/zhengyun' type='text/html'/>
<Link rel='http://specs.openid.net/auth/2.0/provider' href='http://www.google.com/profiles/zhengyun'/>
<Link rel='describedby' href='http://www.google.com/profiles/zhengyun' type='text/html'/>
<Link rel='describedby' href='http://s2.googleusercontent.com/webfinger/?q=acct%3Azhengyun%40gmail.com&fmt=foaf' type='application/rdf+xml'/>
<Link rel='http://schemas.google.com/g/2010#updates-from' href='https://www.googleapis.com/buzz/v1/activities/110589389080388532670/@public' type='application/atom+xml'/>
</XRD>
其中,它返回的
https://www.googleapis.com/buzz/v1/activities/110589389080388532670/@public 就是我的 Google Buzz 公开更新。
Alias节点则是:『The <Alias> element indicates an alternative URI the account might be known as. This would typically be an HTTP profile page, email address (prefixed with a mailto: URI scheme), or another account URI. The first link provides the location of the user’s Portable Contacts service.』所以一般都是对应于用户的Profile地址。
Google 的这个查询入口给了我们一种可能:根据输入的 Email 地址(尤其是Gmail地址),获取他的Profile地址。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
2005-05-26 [sip]SIP消息之逐项讲解 幻灯片