上一篇:发改委又赢了
下一篇:Facebook创始人马克·扎克伯格携华裔女友低调来华(图)
学习OAuth笔记
米娅 2010年12月21日 17:15:53

参考资料链接: The Authoritative Guide to OAuth 1.0

学习ing, 待续



2楼 2010年12月21日 22:47:08 米娅

下面的术语(Terminology)给OAuth描述出一个大体的轮廓,经常发现看术语是个了解系统的捷径:

The Authoritative Guide to OAuth 1.0

Terminology 

下面是我的理解:

一般应用分 客户端 和 服务器 这两方, OAuth 引入了第三方 -- resource owner。 

以twitter 为为例,如果加菲猫通过某个服务器上安装的客户端登陆它的Twitter账户,访问更新它的Twitter内容。加菲猫就是resource owner。这里OAuth认证不让客户端分享加菲猫的Twitter的用户名和密码,来保证加菲猫的信息的安全性。


3楼 2010年12月21日 22:58:23 米娅

这段很有用:

OAuth uses three kinds of credentials: client credentials, temporary credentials, and token credentials. The original version of the specification used a different set of terms for these credentials: consumer key and secret (client credentials), request token and secret (temporary credentials), and access token and secret (token credentials).

OAuth使用三种凭据(credential):

1, client credentials;
2, temporary credentials;
3, token credentials.

明天继续


4楼 2010年12月22日 15:49:26 米娅

另一套命名方式:

1, consumer key and secret (client credentials);
对于twitter,就是提供客户端的用户注册twitter api时,twitter提供给客户端用户的。用来认证客户端。

2, request token and secret (temporary credentials);

这种本人还没遇上过,也许遇上但没意思到。

3, access token and secret (token credentials).

对于twitter,这是twitter服务器根据用户加菲猫提供的用户名、密码信息,将token credentials提供给客户端,从而加菲猫可以使用客户端访问自己在twitter服务器上的信息。同时,加菲猫并不用和客户端分享自己的用户名和密码。

这个token credentials包含一个token identifier和一个保护它的secret.Token credentials一般有个限定的范围和时间,并且resource owner可以随时撤消。


5楼 2010年12月22日 17:14:16 米娅

接下来可以接这篇:在Twitter应用中使用OAuth(入门级)

第1页 共1页
相关链接
1. 免翻墙实现Twitter的OAUTH登陆认证,提供代码下载
2. 在Twitter应用中使用OAuth(入门级)