原址:
http://iceskysl.1sters.com/?action=show&id=419
最近在准备一些API设计开发工作,初步了解了下oauth,OAuth是由Blaine Cook、Chris Messina、Larry Halff 及David Recordon共同发起的,目的在于为API访问授权提供一个开放的标准。
oauth目前看来进展比较顺利,可以看到其有主流语言的lib(Java、C#、Objective-C、Perl、PHP及Ruby语言),目前支持oauth的API有twitter,douban等应用。
OAuth is the great new standard allowing your users to use your application to talk to their accounts on other applications. I won’t go more into it here as it’s pretty well covered on the OAuth site.
OAuth’s Goal
Website X can access your protected data at API Y
All without sharing your password off-site
especially when there isn’t one like with OpenID
其基本流程为:
Register your consumer application with the OAuth compliant service to receive your Consumer Credentials (This is only done once)
You initiate the OAuth Token exchange process for a user by requesting a RequestToken from the Service
You store the RequestToken in your database or in the users session object
You redirect your user to the service providers authorize_url with the RequestToken’s key appended
Your user is asked by the service provider to authorize your RequestToken
Your user clicks yes and is redirected to your CallBack URL
Your callback action exchanges the RequestToken for an AccessToken
Now you can access your users data by performing http requests signed by your consumer credentials and the AccessToken.
????
PROFIT!!!
如果你想了解,请参考如下文档,如果你有经验,请分享,谢谢!
参考文档:
Developing OAuth clients in Ruby
http://stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby
How to turn your rails site into an OAuth Provider
http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider
OAuth不断获得动力
Rails plugin for OAuth
OAuth implementation for Ruby
豆瓣 API 认证授权说明
The How of OAuth --这个PPT挺不错
分享到:
相关推荐
基于java的开发源码-API访问授权的开放标准 OAuth.zip 基于java的开发源码-API访问授权的开放标准 OAuth.zip 基于java的开发源码-API访问授权的开放标准 OAuth.zip 基于java的开发源码-API访问授权的开放标准 OAuth....
java源码:API访问授权的开放标准 OAuth.zip
API访问授权的开放标准 OAuth
API访问授权的开放标准 OAuth.7z
基于Java的API访问授权的开放标准 OAuth.zip
基于java的API访问授权的开放标准 OAuth.zip
基于Java的源码-API访问授权的开放标准 OAuth.zip
基于Java的实例源码-API访问授权的开放标准 OAuth.zip
基于Java的实例开发源码-API访问授权的开放标准 OAuth.zip
OAuth访问控制API指南,架构设计安全性,与现有身份认证访问控制体系的集成
通过winform使用httpclient客户端调用webApi接口,api使用oauth2.0权限控制,调用接口需要进行token获取认证、
SpringCloud(八):API网关整合OAuth2认证授权服务。
Maven坐标:org.springframework.security.oauth:spring-security-oauth2:2.3.5.RELEASE; 标签:spring、security、springframework、oauth2、oauth、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用...
守望者:: OAuth2 该库为Warden提供了一套可靠的授权策略,旨在用于实现OAuth 2.0( )提供程序。用法Grape API示例require 'grape'require 'warden-oauth2'class MyAPI < Grape :: API use Warden :: Manager do ...
asp.net WebAPI OWIN OAuth2.0授权自定义返回结果及错误或异常问题处理核心代码,详情: https://www.cnblogs.com/wgx0428/p/12315546.html
开放授权系统是基于OAuth2.0协议标准构建的京东开放平台授权系统.支持宙斯网关接口授权调用, 京东账号联合登录等功能 1.在进行京东开放系统对接的之前, 在京东开放平台注册开发者账号. 2.并拥有一个已审核通过的...
Maven坐标:org.springframework.security.oauth:spring-security-oauth2:2.3.5.RELEASE; 标签:spring、security、springframework、oauth2、oauth、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,...
一个OAuth授权的一个例子,实现了三种常用的授权方式
3、封装Model,用户信息Model(SinaMUsers.cs) 4、含有一个简单的实例,更快速容易的使用接口。 5、使用日志记录。日志文件路径直接在配置文件(Wbm.QzoneV2.config)里修改。 6、拥有一个网站可以部署多个应用功能...
入门要运行项目,首先安装所有节点包,然后运行 gulp $ npm install$ gulp谷歌 API 使用此项目的一部分演示了如何使用 google 访问令牌对 API 调用进行身份验证获取 access_token 前往 Google 的并选择您要授权的 ...