究竟什么是OAuth(开放授权)?
我从那里得到了一些信息
OAuth Twitter教程:什么是OAuth以及它对你意味着什么 OAuth是什么
但我想学习和了解更多。我在寻找生命周期的信息。为什么大多数社交网络都依赖于这个开放协议?
在不久的将来,随着各种技术的发展(例如ASP.NET),它会成为事实吗?
究竟什么是OAuth(开放授权)?
我从那里得到了一些信息
OAuth Twitter教程:什么是OAuth以及它对你意味着什么 OAuth是什么
但我想学习和了解更多。我在寻找生命周期的信息。为什么大多数社交网络都依赖于这个开放协议?
在不久的将来,随着各种技术的发展(例如ASP.NET),它会成为事实吗?
当前回答
Oauth无疑正在获得动力,并在企业api中变得流行起来。 在应用程序和数据驱动的世界里,企业越来越多地向外部世界公开api,就像谷歌、Facebook、twitter一样。 随着这种发展,身份验证的三向三角就形成了
1) API提供商——任何通过API公开其资产的企业,比如亚马逊、Target等 2)开发人员-通过此api构建移动/其他应用程序的人 3)最终用户-由亚马逊的注册用户/客座用户提供的服务的最终用户
现在这发展了一个与安全相关的情况-(我列出了这些复杂性中的一些) 1)作为终端用户,您希望允许开发人员代表您访问api。 2) API提供者必须验证开发人员和最终用户 3)最终用户应该能够授予和撤销他们所给予的同意的权限 4)开发人员可以对API提供者有不同的信任级别,其中给予她的权限级别是不同的
Oauth是一个试图以标准的方式解决上述问题的授权框架。随着API和应用程序的突出,这个问题将变得越来越重要,任何试图解决这个问题的标准——无论是外部的还是其他的——都将成为API提供商/开发人员甚至最终用户所关心的事情!
其他回答
OAuth是一种开放的授权标准,通常用于互联网用户使用微软、谷歌、Facebook或Twitter账户登录第三方网站而不暴露密码。
OAuth(开放授权)是访问授权/授权协议的开放标准。它是互联网用户授权网站或应用程序访问他们在其他网站上的信息而不提供密码的一种方式。它不处理身份验证。
Or
OAuth 2.0是一种协议,允许用户将其在一个站点上的资源的有限访问权限授予另一个站点,而无需暴露他们的凭据。
Analogy 1: Many luxury cars today come with a valet key. It is a special key you give the parking attendant and unlike your regular key, will not allow the car to drive more than a mile or two. Some valet keys will not open the trunk, while others will block access to your onboard cell phone address book. Regardless of what restrictions the valet key imposes, the idea is very clever. You give someone limited access to your car with a special key, while using your regular key to unlock everything. src from auth0 Analogy 2: Assume, we want to fill an application form for a bank account. Here Oauth works as, instead of filling the form by applicant, bank can fill the form using Adhaar or passport. Here the following three entities are involved: Applicant i.e. Owner Bank Account is OAuth Client, they need information Adhaar/Passport ID is OAuth Provider
OAuth是什么?
OAuth只是一个安全的授权协议,用于处理第三方应用程序的授权,以便在不暴露用户密码的情况下访问用户数据。(例如,在许多网站上登录Facebook, gPlus, Twitter)都在此协议下工作。
各方
当你了解有关各方时,议定书就变得更容易了。基本上,涉及到三个方面:OAuth提供者、OAuth客户端和所有者。
OAuth客户端(想要访问您的凭据的应用程序) OAuth提供者(例如;Facebook, Twitter等) 所有者(拥有Facebook、Twitter等账户的人)
工作原理
我假设了一个场景,一个网站(Stack Overflow)需要添加一个登录与Facebook功能。因此,Facebook是OAuth提供者,Stack Overflow是OAuth客户端。
This step is done by the app's developer. At the very beginning, Facebook (OAuth Provider) has no idea about the Stack Overflow (OAuth Client) because there is no link between them. So the very first step is to register Stack Overflow with Facebook developers site. This is done manually where developers need to give the app's information to Facebook like the app's name, website, logo, redirectUrl (important one). Then Stack Overflow is successfully registered, has got client Id, client secret, etc from Facebook, and is up and running with OAuth.
现在当Stack Overflow的用户点击登录Facebook按钮。Stack Overflow请求Facebook使用ClientId (Facebook使用它来识别客户端)和redirectUrl(成功后Facebook将返回此URL)。因此,用户被重定向到Facebook登录页面。这是最好的部分,用户(所有者)不会把他们的Facebook凭证给Stack Overflow。
After Owner allows Stack Overflow to access the information. Then Facebook redirects back to Stack Overflow, along with authcode using the redirectUrl provided at step 2. Then Stack Overflow contacts Facebook along with the obtained authcode to make sure everything is okay. Only then Facebook will give access token to Stack Overflow. Then access token is used by Stack Overflow to retrieve the owner's information without using a password. This is the whole motive of OAuth, where actual credentials are never exposed to third-party applications.
更多信息:
快速视频
网页链接
Oauth无疑正在获得动力,并在企业api中变得流行起来。 在应用程序和数据驱动的世界里,企业越来越多地向外部世界公开api,就像谷歌、Facebook、twitter一样。 随着这种发展,身份验证的三向三角就形成了
1) API提供商——任何通过API公开其资产的企业,比如亚马逊、Target等 2)开发人员-通过此api构建移动/其他应用程序的人 3)最终用户-由亚马逊的注册用户/客座用户提供的服务的最终用户
现在这发展了一个与安全相关的情况-(我列出了这些复杂性中的一些) 1)作为终端用户,您希望允许开发人员代表您访问api。 2) API提供者必须验证开发人员和最终用户 3)最终用户应该能够授予和撤销他们所给予的同意的权限 4)开发人员可以对API提供者有不同的信任级别,其中给予她的权限级别是不同的
Oauth是一个试图以标准的方式解决上述问题的授权框架。随着API和应用程序的突出,这个问题将变得越来越重要,任何试图解决这个问题的标准——无论是外部的还是其他的——都将成为API提供商/开发人员甚至最终用户所关心的事情!
授权: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在客户端和授权服务器之间进行通信。在两个应用程序之间传递。