究竟什么是OAuth(开放授权)?

我从那里得到了一些信息

OAuth Twitter教程:什么是OAuth以及它对你意味着什么 OAuth是什么

但我想学习和了解更多。我在寻找生命周期的信息。为什么大多数社交网络都依赖于这个开放协议?

在不久的将来,随着各种技术的发展(例如ASP.NET),它会成为事实吗?


当前回答

究竟什么是OAuth(开放授权)?

OAuth允许通知资源提供者(例如Facebook),资源所有者(例如您)授予第三方(例如Facebook应用程序)访问他们的信息(例如您的朋友列表)的权限。

如果你看清楚了,我就能理解你的困惑了。让我们举一个具体的例子:加入另一个社交网络!

假设您有一个现有的Gmail帐户。你决定加入领英。手动添加你所有的朋友是很烦人的,而且容易出错。你可能中途就厌倦了,或者在邀请函的电子邮件地址中插入了错别字。所以你可能会忍不住不去创建一个账户。

面对这种情况,LinkedIn™有一个好主意,写了一个程序,自动添加你的朋友名单,因为电脑在无聊和容易出错的任务上要有效率得多。既然现在加入网络是如此容易,你不可能拒绝这样的提议,对吧?

如果没有API来交换这个联系人列表,你将不得不把你的Gmail帐户的用户名和密码交给领英,从而给了他们太多的权力。

这就是OAuth的用武之地。如果您的GMail支持OAuth协议,那么LinkedIn可以要求您授权他们访问您的GMail联系人列表。

OAuth允许:

Different access levels: read-only VS read-write. This allows you to grant access to your user list or bi-directional access to automatically synchronize your new LinkedIn friends to your Gmail contacts. Access granularity: you can decide to grant access to only your contact information (username, e-mail, date of birth, etc.) or to your entire list of friends, calendar and whatnot. It allows you to manage access from the resource provider's application. If the third-party application does not provide a mechanism for canceling access, you would be stuck with them having access to your information. With OAuth, there is a provision for revoking access at any time.

在不久的将来,它会成为事实上的标准吗?

虽然OAuth是向前迈出的重要一步,但如果人们不正确使用它,它就不能解决问题。例如,如果资源提供者一次只对所有资源提供一个读写访问级别,而不提供管理访问的机制,那么就没有指向它的点。换句话说,OAuth是一个提供授权功能而不仅仅是身份验证的框架。

在实践中,它非常符合社会网络模型。对于那些希望允许第三方“插件”的社交网络来说,它尤其受欢迎。在这个领域中,访问资源本身是必要的,同时也是不可靠的(例如,您对这些应用程序几乎或根本没有质量控制)。

我在野外还没见过这么多其他用途。我的意思是,我不知道有哪家在线金融咨询公司会自动访问你的银行记录,尽管技术上可以这样使用。

其他回答

授权:OAuth顾名思义只是一种授权标准。

用于登录第三方网站:使用OAuth,您可以使用您的谷歌,Facebook, Twitter或微软帐户登录第三方网站,而无需提供密码。

记住密码:使用OAuth,你可以避免在你在互联网上使用的每个web应用程序上创建帐户和记住密码。

Access token: OAuth is based on an access token concept. When a person authenticate hinself using his Google account, to a third party web application. Google authorization server issues an access token for that web application the person is using. Thus, the web application can use that access token to access his data hosted in the resource server. In the case of Google, your Gmail inbox, contacts, photos etc. are the resources. So, any third party application can access those resources, for an example view his Gmail inbox using OAuth. Hence, OAuth is a simple way to publish and interact with protected resource data. It’s also a safer and more secure way for people to give you access to their resource data.

OAuth2和HTTPS:由于机密数据(例如客户端凭证),OAuth2使用HTTPS在客户端和授权服务器之间进行通信。在两个应用程序之间传递。

Simply put OAuth is a way for applications to gain credentials to your information without directly getting your user login information to some website. For example if you write an application on your own website and want it to use data from a user's facebook account, you can use OAuth to get a token via a callback url and then use that token to make calls to the facebook API to get their use data until the token expires. Websites rely on it because it allows programmers to access their data without the user having to directly disclose their information and spread their credentials around online but still provide a level of protection to the data. Will it become the de facto method of authorization? Perhaps, it's been gaining a lot of support recently from Twitter, Facebook, and the likes where other programmers want to build applications around user data.

究竟什么是OAuth(开放授权)?

OAuth允许通知资源提供者(例如Facebook),资源所有者(例如您)授予第三方(例如Facebook应用程序)访问他们的信息(例如您的朋友列表)的权限。

如果你看清楚了,我就能理解你的困惑了。让我们举一个具体的例子:加入另一个社交网络!

假设您有一个现有的Gmail帐户。你决定加入领英。手动添加你所有的朋友是很烦人的,而且容易出错。你可能中途就厌倦了,或者在邀请函的电子邮件地址中插入了错别字。所以你可能会忍不住不去创建一个账户。

面对这种情况,LinkedIn™有一个好主意,写了一个程序,自动添加你的朋友名单,因为电脑在无聊和容易出错的任务上要有效率得多。既然现在加入网络是如此容易,你不可能拒绝这样的提议,对吧?

如果没有API来交换这个联系人列表,你将不得不把你的Gmail帐户的用户名和密码交给领英,从而给了他们太多的权力。

这就是OAuth的用武之地。如果您的GMail支持OAuth协议,那么LinkedIn可以要求您授权他们访问您的GMail联系人列表。

OAuth允许:

Different access levels: read-only VS read-write. This allows you to grant access to your user list or bi-directional access to automatically synchronize your new LinkedIn friends to your Gmail contacts. Access granularity: you can decide to grant access to only your contact information (username, e-mail, date of birth, etc.) or to your entire list of friends, calendar and whatnot. It allows you to manage access from the resource provider's application. If the third-party application does not provide a mechanism for canceling access, you would be stuck with them having access to your information. With OAuth, there is a provision for revoking access at any time.

在不久的将来,它会成为事实上的标准吗?

虽然OAuth是向前迈出的重要一步,但如果人们不正确使用它,它就不能解决问题。例如,如果资源提供者一次只对所有资源提供一个读写访问级别,而不提供管理访问的机制,那么就没有指向它的点。换句话说,OAuth是一个提供授权功能而不仅仅是身份验证的框架。

在实践中,它非常符合社会网络模型。对于那些希望允许第三方“插件”的社交网络来说,它尤其受欢迎。在这个领域中,访问资源本身是必要的,同时也是不可靠的(例如,您对这些应用程序几乎或根本没有质量控制)。

我在野外还没见过这么多其他用途。我的意思是,我不知道有哪家在线金融咨询公司会自动访问你的银行记录,尽管技术上可以这样使用。

OAuth是一种开放的授权标准,通常用于互联网用户使用微软、谷歌、Facebook或Twitter账户登录第三方网站而不暴露密码。

Oauth无疑正在获得动力,并在企业api中变得流行起来。 在应用程序和数据驱动的世界里,企业越来越多地向外部世界公开api,就像谷歌、Facebook、twitter一样。 随着这种发展,身份验证的三向三角就形成了

1) API提供商——任何通过API公开其资产的企业,比如亚马逊、Target等 2)开发人员-通过此api构建移动/其他应用程序的人 3)最终用户-由亚马逊的注册用户/客座用户提供的服务的最终用户

现在这发展了一个与安全相关的情况-(我列出了这些复杂性中的一些) 1)作为终端用户,您希望允许开发人员代表您访问api。 2) API提供者必须验证开发人员和最终用户 3)最终用户应该能够授予和撤销他们所给予的同意的权限 4)开发人员可以对API提供者有不同的信任级别,其中给予她的权限级别是不同的

Oauth是一个试图以标准的方式解决上述问题的授权框架。随着API和应用程序的突出,这个问题将变得越来越重要,任何试图解决这个问题的标准——无论是外部的还是其他的——都将成为API提供商/开发人员甚至最终用户所关心的事情!