Added support for two-legged OAuth.

git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@92 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
This commit is contained in:
Bob Aman committed 2010-10-22 00:36:23 +00:00
1 parent d346426d4d
commit 20eff1df7d
4 files changed
+185 -96

No files matched your search

+8
View File
@@ -71,6 +71,14 @@ module Google
:client_credential_key => 'anonymous',
:client_credential_secret => 'anonymous'
)
when :two_legged_oauth_1, :two_legged_oauth
require 'signet/oauth_1/client'
# NOTE: Do not rely on this default value, as it may change
@options[:authorization] = Signet::OAuth1::Client.new(
:client_credential_key => nil,
:client_credential_secret => nil,
:two_legged => true
)
when nil
# No authorization mechanism
else