百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
O

oauth

> 编程语言
开源

鲁比的OAuth执行. 备注的官方维护版本现载于http://GitHub.com/mojodna/oauth

308 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

鲁比的OAuth执行. 备注的官方维护版本现载于http://GitHub.com/mojodna/oauth

= Ruby OAuth

== What

This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.

See the OAuth specs http://oauth.net/core/1.0/

== Installing

sudo gem install oauth

The source code is now hosted on the OAuth GitHub Project http://github.com/oauth/oauth-ruby

== The basics

This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin.

As a matter of fact it has been pulled out from an OAuth Rails Plugin http://code.google.com/p/oauth-plugin/ which now requires this GEM.

== Demonstration of usage

Create a new consumer instance by passing it a configuration hash:

@consumer = OAuth::Consumer.new("key","secret", :site => "https://agree2")

Start the process by requesting a token

@request_token = @consumer.get_request_token session[:request_token] = @request_token redirect_to @request_token.authorize_url

When user returns create an access_token

@access_token = @request_token.get_access_token @photos = @access_token.get('/photos.xml')

Now that you have an access token, you can use Typhoeus to interact with the OAuth provider if you choose.

oauth_params = {:consumer => oauth_consumer, :token => access_token} hydra = Typhoeus::Hydra.new req = Typhoeus::Request.new(uri, options) oauth_helper = OAuth::Client::Helper.new(req, oauth_params.merge(:request_uri => uri)) req.headers.merge!({"Authorization" => oauth_helper.header}) # Signs the request hydra.queue(req) hydra.run @response = req.response

== More Information

  • RDoc: http://rdoc.info/projects/oauth/oauth-ruby/
  • Mailing List/Google Group: http://groups.google.com/group/oauth-ruby

== How to submit patches

The source code is now hosted on the OAuth GitHub Project http://github.com/oauth/oauth-ruby

To submit a patch, please fork the oauth project and create a patch with tests. Once you're happy with it send a pull request and post a message to the google group.

== License

This code is free to use under the terms of the MIT license.

== Contact

OAuth Ruby has been created and maintained by a large number of talented individuals. The current maintainer is Aaron Quint (quirkey).

Comments are welcome. Send an email to via the OAuth Ruby mailing list http://groups.google.com/group/oauth-ruby

Issues· 15 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言