omniauth 0.2.6 → 0.3.0.rc3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of omniauth might be problematic. Click here for more details.

Files changed (189) hide show
  1. data/README.md +62 -34
  2. data/lib/omniauth/version.rb +3 -3
  3. metadata +74 -228
  4. data/Gemfile +0 -12
  5. data/Rakefile +0 -51
  6. data/oa-basic/Gemfile +0 -7
  7. data/oa-basic/LICENSE +0 -19
  8. data/oa-basic/README.rdoc +0 -34
  9. data/oa-basic/Rakefile +0 -6
  10. data/oa-basic/lib/oa-basic.rb +0 -1
  11. data/oa-basic/lib/omniauth/basic.rb +0 -8
  12. data/oa-basic/lib/omniauth/strategies/http_basic.rb +0 -56
  13. data/oa-basic/lib/omniauth/version.rb +0 -19
  14. data/oa-basic/oa-basic.gemspec +0 -27
  15. data/oa-basic/spec/omniauth/strategies/basic_spec.rb +0 -7
  16. data/oa-basic/spec/spec_helper.rb +0 -11
  17. data/oa-core/Gemfile +0 -3
  18. data/oa-core/LICENSE +0 -19
  19. data/oa-core/Rakefile +0 -6
  20. data/oa-core/autotest/discover.rb +0 -1
  21. data/oa-core/lib/oa-core.rb +0 -1
  22. data/oa-core/lib/omniauth/builder.rb +0 -33
  23. data/oa-core/lib/omniauth/core.rb +0 -135
  24. data/oa-core/lib/omniauth/form.rb +0 -186
  25. data/oa-core/lib/omniauth/strategy.rb +0 -227
  26. data/oa-core/lib/omniauth/test.rb +0 -12
  27. data/oa-core/lib/omniauth/test/phony_session.rb +0 -8
  28. data/oa-core/lib/omniauth/test/strategy_macros.rb +0 -34
  29. data/oa-core/lib/omniauth/test/strategy_test_case.rb +0 -49
  30. data/oa-core/lib/omniauth/version.rb +0 -19
  31. data/oa-core/oa-core.gemspec +0 -24
  32. data/oa-core/spec/omniauth/builder_spec.rb +0 -20
  33. data/oa-core/spec/omniauth/core_spec.rb +0 -79
  34. data/oa-core/spec/omniauth/strategy_spec.rb +0 -363
  35. data/oa-core/spec/spec_helper.rb +0 -12
  36. data/oa-enterprise/Gemfile +0 -7
  37. data/oa-enterprise/LICENSE +0 -19
  38. data/oa-enterprise/README.rdoc +0 -82
  39. data/oa-enterprise/Rakefile +0 -6
  40. data/oa-enterprise/lib/oa-enterprise.rb +0 -1
  41. data/oa-enterprise/lib/omniauth/enterprise.rb +0 -8
  42. data/oa-enterprise/lib/omniauth/strategies/cas.rb +0 -47
  43. data/oa-enterprise/lib/omniauth/strategies/cas/configuration.rb +0 -98
  44. data/oa-enterprise/lib/omniauth/strategies/cas/service_ticket_validator.rb +0 -91
  45. data/oa-enterprise/lib/omniauth/strategies/ldap.rb +0 -111
  46. data/oa-enterprise/lib/omniauth/strategies/ldap/adaptor.rb +0 -279
  47. data/oa-enterprise/lib/omniauth/version.rb +0 -19
  48. data/oa-enterprise/oa-enterprise.gemspec +0 -31
  49. data/oa-enterprise/spec/fixtures/cas_failure.xml +0 -4
  50. data/oa-enterprise/spec/fixtures/cas_success.xml +0 -8
  51. data/oa-enterprise/spec/omniauth/strategies/cas_spec.rb +0 -94
  52. data/oa-enterprise/spec/omniauth/strategies/ldap_spec.rb +0 -41
  53. data/oa-enterprise/spec/spec_helper.rb +0 -14
  54. data/oa-more/Gemfile +0 -7
  55. data/oa-more/LICENSE +0 -19
  56. data/oa-more/README.rdoc +0 -22
  57. data/oa-more/Rakefile +0 -6
  58. data/oa-more/lib/oa-more.rb +0 -1
  59. data/oa-more/lib/omniauth/more.rb +0 -11
  60. data/oa-more/lib/omniauth/strategies/draugiem.rb +0 -104
  61. data/oa-more/lib/omniauth/strategies/flickr.rb +0 -86
  62. data/oa-more/lib/omniauth/strategies/ign.rb +0 -93
  63. data/oa-more/lib/omniauth/strategies/windows_live.rb +0 -39
  64. data/oa-more/lib/omniauth/strategies/windows_live/windowslivelogin.rb +0 -1143
  65. data/oa-more/lib/omniauth/strategies/yupoo.rb +0 -67
  66. data/oa-more/lib/omniauth/version.rb +0 -19
  67. data/oa-more/oa-more.gemspec +0 -29
  68. data/oa-more/spec/omniauth/strategies/draugiem_spec.rb +0 -51
  69. data/oa-more/spec/omniauth/strategies/flickr_spec.rb +0 -7
  70. data/oa-more/spec/spec_helper.rb +0 -11
  71. data/oa-oauth/Gemfile +0 -7
  72. data/oa-oauth/LICENSE +0 -19
  73. data/oa-oauth/README.rdoc +0 -35
  74. data/oa-oauth/Rakefile +0 -6
  75. data/oa-oauth/autotest/discover.rb +0 -1
  76. data/oa-oauth/lib/oa-oauth.rb +0 -1
  77. data/oa-oauth/lib/omniauth/oauth.rb +0 -56
  78. data/oa-oauth/lib/omniauth/strategies/bitly.rb +0 -46
  79. data/oa-oauth/lib/omniauth/strategies/dailymile.rb +0 -64
  80. data/oa-oauth/lib/omniauth/strategies/doit.rb +0 -60
  81. data/oa-oauth/lib/omniauth/strategies/dopplr.rb +0 -53
  82. data/oa-oauth/lib/omniauth/strategies/douban.rb +0 -60
  83. data/oa-oauth/lib/omniauth/strategies/evernote.rb +0 -54
  84. data/oa-oauth/lib/omniauth/strategies/facebook.rb +0 -70
  85. data/oa-oauth/lib/omniauth/strategies/foursquare.rb +0 -62
  86. data/oa-oauth/lib/omniauth/strategies/github.rb +0 -50
  87. data/oa-oauth/lib/omniauth/strategies/goodreads.rb +0 -44
  88. data/oa-oauth/lib/omniauth/strategies/google.rb +0 -80
  89. data/oa-oauth/lib/omniauth/strategies/gowalla.rb +0 -72
  90. data/oa-oauth/lib/omniauth/strategies/hyves.rb +0 -67
  91. data/oa-oauth/lib/omniauth/strategies/identica.rb +0 -49
  92. data/oa-oauth/lib/omniauth/strategies/instagram.rb +0 -56
  93. data/oa-oauth/lib/omniauth/strategies/instapaper.rb +0 -40
  94. data/oa-oauth/lib/omniauth/strategies/linked_in.rb +0 -56
  95. data/oa-oauth/lib/omniauth/strategies/mailru.rb +0 -107
  96. data/oa-oauth/lib/omniauth/strategies/meetup.rb +0 -56
  97. data/oa-oauth/lib/omniauth/strategies/miso.rb +0 -41
  98. data/oa-oauth/lib/omniauth/strategies/mixi.rb +0 -59
  99. data/oa-oauth/lib/omniauth/strategies/netflix.rb +0 -65
  100. data/oa-oauth/lib/omniauth/strategies/oauth.rb +0 -83
  101. data/oa-oauth/lib/omniauth/strategies/oauth2.rb +0 -91
  102. data/oa-oauth/lib/omniauth/strategies/plurk.rb +0 -58
  103. data/oa-oauth/lib/omniauth/strategies/qzone.rb +0 -69
  104. data/oa-oauth/lib/omniauth/strategies/rdio.rb +0 -45
  105. data/oa-oauth/lib/omniauth/strategies/renren.rb +0 -87
  106. data/oa-oauth/lib/omniauth/strategies/salesforce.rb +0 -44
  107. data/oa-oauth/lib/omniauth/strategies/smug_mug.rb +0 -42
  108. data/oa-oauth/lib/omniauth/strategies/sound_cloud.rb +0 -46
  109. data/oa-oauth/lib/omniauth/strategies/t163.rb +0 -57
  110. data/oa-oauth/lib/omniauth/strategies/taobao.rb +0 -79
  111. data/oa-oauth/lib/omniauth/strategies/teambox.rb +0 -49
  112. data/oa-oauth/lib/omniauth/strategies/thirty_seven_signals.rb +0 -41
  113. data/oa-oauth/lib/omniauth/strategies/tqq.rb +0 -64
  114. data/oa-oauth/lib/omniauth/strategies/trade_me.rb +0 -45
  115. data/oa-oauth/lib/omniauth/strategies/trip_it.rb +0 -22
  116. data/oa-oauth/lib/omniauth/strategies/tsina.rb +0 -79
  117. data/oa-oauth/lib/omniauth/strategies/tsohu.rb +0 -57
  118. data/oa-oauth/lib/omniauth/strategies/tumblr.rb +0 -60
  119. data/oa-oauth/lib/omniauth/strategies/twitter.rb +0 -57
  120. data/oa-oauth/lib/omniauth/strategies/type_pad.rb +0 -76
  121. data/oa-oauth/lib/omniauth/strategies/vimeo.rb +0 -54
  122. data/oa-oauth/lib/omniauth/strategies/vkontakte.rb +0 -87
  123. data/oa-oauth/lib/omniauth/strategies/xauth.rb +0 -67
  124. data/oa-oauth/lib/omniauth/strategies/yahoo.rb +0 -55
  125. data/oa-oauth/lib/omniauth/strategies/yammer.rb +0 -43
  126. data/oa-oauth/lib/omniauth/strategies/you_tube.rb +0 -73
  127. data/oa-oauth/lib/omniauth/version.rb +0 -19
  128. data/oa-oauth/oa-oauth.gemspec +0 -32
  129. data/oa-oauth/spec/fixtures/basecamp_200.xml +0 -24
  130. data/oa-oauth/spec/fixtures/campfire_200.json +0 -10
  131. data/oa-oauth/spec/omniauth/strategies/bitly_spec.rb +0 -5
  132. data/oa-oauth/spec/omniauth/strategies/dailymile_spec.rb +0 -5
  133. data/oa-oauth/spec/omniauth/strategies/doit_spec.rb +0 -5
  134. data/oa-oauth/spec/omniauth/strategies/dopplr_spec.rb +0 -5
  135. data/oa-oauth/spec/omniauth/strategies/douban_spec.rb +0 -5
  136. data/oa-oauth/spec/omniauth/strategies/evernote_spec.rb +0 -5
  137. data/oa-oauth/spec/omniauth/strategies/facebook_spec.rb +0 -5
  138. data/oa-oauth/spec/omniauth/strategies/foursquare_spec.rb +0 -18
  139. data/oa-oauth/spec/omniauth/strategies/github_spec.rb +0 -5
  140. data/oa-oauth/spec/omniauth/strategies/goodreads_spec.rb +0 -6
  141. data/oa-oauth/spec/omniauth/strategies/google_spec.rb +0 -5
  142. data/oa-oauth/spec/omniauth/strategies/gowalla_spec.rb +0 -5
  143. data/oa-oauth/spec/omniauth/strategies/hyves_spec.rb +0 -5
  144. data/oa-oauth/spec/omniauth/strategies/identica_spec.rb +0 -5
  145. data/oa-oauth/spec/omniauth/strategies/linked_in_spec.rb +0 -5
  146. data/oa-oauth/spec/omniauth/strategies/mailru_spec.rb +0 -5
  147. data/oa-oauth/spec/omniauth/strategies/meetup_spec.rb +0 -14
  148. data/oa-oauth/spec/omniauth/strategies/miso_spec.rb +0 -5
  149. data/oa-oauth/spec/omniauth/strategies/netflix_spec.rb +0 -5
  150. data/oa-oauth/spec/omniauth/strategies/oauth2_spec.rb +0 -0
  151. data/oa-oauth/spec/omniauth/strategies/oauth_spec.rb +0 -77
  152. data/oa-oauth/spec/omniauth/strategies/plurk_spec.rb +0 -5
  153. data/oa-oauth/spec/omniauth/strategies/rdio_spec.rb +0 -5
  154. data/oa-oauth/spec/omniauth/strategies/salesforce_spec.rb +0 -5
  155. data/oa-oauth/spec/omniauth/strategies/smug_mug_spec.rb +0 -5
  156. data/oa-oauth/spec/omniauth/strategies/sound_cloud_spec.rb +0 -5
  157. data/oa-oauth/spec/omniauth/strategies/t163_spec.rb +0 -5
  158. data/oa-oauth/spec/omniauth/strategies/taobao_spec.rb +0 -5
  159. data/oa-oauth/spec/omniauth/strategies/teambox_spec.rb +0 -5
  160. data/oa-oauth/spec/omniauth/strategies/thirty_seven_signals_spec.rb +0 -5
  161. data/oa-oauth/spec/omniauth/strategies/trade_me_spec.rb +0 -5
  162. data/oa-oauth/spec/omniauth/strategies/trip_it_spec.rb +0 -5
  163. data/oa-oauth/spec/omniauth/strategies/tsina_spec.rb +0 -5
  164. data/oa-oauth/spec/omniauth/strategies/tumblr_spec.rb +0 -5
  165. data/oa-oauth/spec/omniauth/strategies/twitter_spec.rb +0 -20
  166. data/oa-oauth/spec/omniauth/strategies/type_pad_spec.rb +0 -5
  167. data/oa-oauth/spec/omniauth/strategies/vimeo_spec.rb +0 -5
  168. data/oa-oauth/spec/omniauth/strategies/vkontakte_spec.rb +0 -5
  169. data/oa-oauth/spec/omniauth/strategies/yahoo_spec.rb +0 -5
  170. data/oa-oauth/spec/omniauth/strategies/yammer_spec.rb +0 -5
  171. data/oa-oauth/spec/omniauth/strategies/you_tube_spec.rb +0 -5
  172. data/oa-oauth/spec/spec_helper.rb +0 -27
  173. data/oa-oauth/spec/support/shared_examples.rb +0 -29
  174. data/oa-openid/Gemfile +0 -7
  175. data/oa-openid/LICENSE +0 -19
  176. data/oa-openid/README.rdoc +0 -51
  177. data/oa-openid/Rakefile +0 -6
  178. data/oa-openid/lib/oa-openid.rb +0 -1
  179. data/oa-openid/lib/omniauth/openid.rb +0 -60
  180. data/oa-openid/lib/omniauth/openid/gapps.rb +0 -32
  181. data/oa-openid/lib/omniauth/strategies/google_apps.rb +0 -23
  182. data/oa-openid/lib/omniauth/strategies/open_id.rb +0 -132
  183. data/oa-openid/lib/omniauth/strategies/steam.rb +0 -55
  184. data/oa-openid/lib/omniauth/version.rb +0 -19
  185. data/oa-openid/oa-openid.gemspec +0 -28
  186. data/oa-openid/spec/omniauth/strategies/open_id_spec.rb +0 -71
  187. data/oa-openid/spec/spec_helper.rb +0 -14
  188. data/omniauth.gemspec +0 -20
  189. data/tasks/all.rb +0 -134
@@ -1,67 +0,0 @@
1
- require 'omniauth/core'
2
- require 'digest/md5'
3
- require 'rest-client'
4
- require 'multi_json'
5
-
6
- module OmniAuth
7
- module Strategies
8
- class Yupoo
9
- include OmniAuth::Strategy
10
- attr_accessor :api_key, :secret_key, :options
11
-
12
-
13
- class CallbackError < StandardError
14
- attr_accessor :error, :error_reason
15
- def initialize(error, error_reason)
16
- self.error = error
17
- self.error_reason = error_reason
18
- end
19
- end
20
-
21
- def initialize(app, api_key, secret_key, options = {})
22
- super(app, :yupoo)
23
- @api_key = api_key
24
- @secret_key = secret_key
25
- @options = {:scope => 'read'}.merge(options)
26
- end
27
-
28
- protected
29
-
30
- def request_phase
31
- params = { :api_key => api_key, :perms => options[:scope] }
32
- params[:api_sig] = yupoo_sign(params)
33
- query_string = params.collect{ |key,value| "#{key}=#{Rack::Utils.escape(value)}" }.join('&')
34
- redirect "http://www.yupoo.com/services/auth/?#{query_string}"
35
- end
36
-
37
- def callback_phase
38
- params = { :api_key => api_key, :method => 'yupoo.auth.getToken', :frob => request.params['frob'], :format => 'json', :nojsoncallback => '1' }
39
- params[:api_sig] = yupoo_sign(params)
40
-
41
- response = RestClient.get('http://www.yupoo.com/api/rest/', { :params => params })
42
- auth = MultiJson.decode(response.to_s)
43
- raise CallbackError.new(auth['code'],auth['message']) if auth['stat'] == 'fail'
44
-
45
- @user = auth['auth']['user']
46
- @access_token = auth['auth']['token']['_content']
47
-
48
- super
49
- rescue CallbackError => e
50
- fail!(:invalid_response, e)
51
- end
52
-
53
- def auth_hash
54
- OmniAuth::Utils.deep_merge(super, {
55
- 'uid' => @user['nsid'],
56
- 'credentials' => { 'token' => @access_token },
57
- 'user_info' => @user,
58
- 'extra' => { 'user_hash' => @user }
59
- })
60
- end
61
-
62
- def yupoo_sign(params)
63
- Digest::MD5.hexdigest(secret_key + params.sort{|a,b| a[0].to_s <=> b[0].to_s }.flatten.join)
64
- end
65
- end
66
- end
67
- end
@@ -1,19 +0,0 @@
1
- module OmniAuth
2
- module Version
3
- unless defined?(::OmniAuth::Version::MAJOR)
4
- MAJOR = 0
5
- end
6
- unless defined?(::OmniAuth::Version::MINOR)
7
- MINOR = 2
8
- end
9
- unless defined?(::OmniAuth::Version::PATCH)
10
- PATCH = 6
11
- end
12
- unless defined?(::OmniAuth::Version::PRE)
13
- PRE = nil
14
- end
15
- unless defined?(::OmniAuth::Version::STRING)
16
- STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
17
- end
18
- end
19
- end
@@ -1,29 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/omniauth/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.add_runtime_dependency 'multi_json', '~> 1.0.0'
6
- gem.add_runtime_dependency 'oa-core', OmniAuth::Version::STRING
7
- gem.add_runtime_dependency 'rest-client', '~> 1.6.0'
8
- gem.add_development_dependency 'json_pure', '~> 1.5'
9
- gem.add_development_dependency 'maruku', '~> 0.6'
10
- gem.add_development_dependency 'rake', '~> 0.8'
11
- gem.add_development_dependency 'rack-test', '~> 0.5'
12
- gem.add_development_dependency 'rspec', '~> 2.5'
13
- gem.add_development_dependency 'simplecov', '~> 0.4'
14
- gem.add_development_dependency 'webmock', '~> 1.6'
15
- gem.add_development_dependency 'yard', '~> 0.7'
16
- gem.add_development_dependency 'ZenTest', '~> 4.5'
17
- gem.name = 'oa-more'
18
- gem.version = OmniAuth::Version::STRING
19
- gem.description = %q{Additional strategies for OmniAuth.}
20
- gem.summary = gem.description
21
- gem.email = 'michael@intridea.com'
22
- gem.homepage = 'http://github.com/intridea/omniauth'
23
- gem.authors = ['Michael Bleigh', 'Erik Michaels-Ober']
24
- gem.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
25
- gem.files = `git ls-files`.split("\n")
26
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
- gem.require_paths = ['lib']
28
- gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if gem.respond_to? :required_rubygems_version=
29
- end
@@ -1,51 +0,0 @@
1
- require File.expand_path('../../../spec_helper', __FILE__)
2
-
3
- describe 'OmniAuth::Strategies::Draugiem', :type => :strategy do
4
-
5
- include OmniAuth::Test::StrategyTestCase
6
-
7
- def strategy
8
- [OmniAuth::Strategies::Draugiem, '123', "abc"]
9
- end
10
-
11
- it 'should initialize with api key and app id' do
12
- lambda{OmniAuth::Strategies::Draugiem.new({},'123','abc')}.should_not raise_error
13
- end
14
-
15
- describe '/auth/draugiem' do
16
-
17
- it 'should redirect to api.draugiem.lv' do
18
- get '/auth/draugiem'
19
- last_response.should be_redirect
20
- last_response.headers['Location'].should match %r{http://api\.draugiem\.lv/authorize/}
21
- end
22
-
23
- it 'should gather user data after success authorization' do
24
- stub_request(:get, "http://api.draugiem.lv/json/?action=authorize&app=abc&code=123456").
25
- to_return(:body => MultiJson.encode({
26
- 'apikey'=>"123456789",
27
- 'uid'=>"100",
28
- 'language'=>"lv",
29
- 'users'=>{
30
- '100'=>{
31
- 'uid'=>"100",
32
- 'name'=>"John",
33
- 'surname'=>"Lenon",
34
- 'nick'=>"johnybravo",
35
- 'place'=>"Durbe",
36
- 'age'=>"false",
37
- 'adult'=>"1",
38
- 'img'=>"http://4.bp.blogspot.com/_ZmXOoYjxXog/Sg2jby1RFSI/AAAAAAAAE_Q/1LpfjimAz50/s400/JohnnyBravo3.gif",
39
- 'sex'=>"M"
40
- }
41
- }
42
- }))
43
- get '/auth/draugiem/callback?dr_auth_status=ok&dr_auth_code=123456'
44
-
45
- last_request.env['omniauth.auth']['credentials']['apikey'].should == "123456789"
46
- last_request.env['omniauth.auth']['user_info']['location'].should == "Durbe"
47
- last_request.env['omniauth.auth']['user_info']['age'].should be_nil
48
- last_request.env['omniauth.auth']['user_info']['adult'].should be_true
49
- end
50
- end
51
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../spec_helper', __FILE__)
2
-
3
- describe 'OmniAuth::Strategies::Flickr' do
4
- it 'should initialize with a consumer key and secret' do
5
- lambda{OmniAuth::Strategies::Flickr.new({},'abc','def')}.should_not raise_error
6
- end
7
- end
@@ -1,11 +0,0 @@
1
- require 'simplecov'
2
- SimpleCov.start
3
- require 'rspec'
4
- require 'rack/test'
5
- require 'webmock/rspec'
6
- require 'omniauth/more'
7
-
8
- RSpec.configure do |config|
9
- config.include Rack::Test::Methods
10
- config.include WebMock::API
11
- end
data/oa-oauth/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- platforms :jruby do
4
- gem 'jruby-openssl', '~> 0.7'
5
- end
6
-
7
- gemspec
data/oa-oauth/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2010-2011 Michael Bleigh and Intridea, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
data/oa-oauth/README.rdoc DELETED
@@ -1,35 +0,0 @@
1
- = OmniAuth::OAuth
2
-
3
- OAuth 1.0 and 2.0 strategies for the OmniAuth gem.
4
-
5
- == Installation
6
-
7
- To get just OAuth functionality:
8
-
9
- gem install oa-oauth
10
-
11
- For the full auth suite:
12
-
13
- gem install omniauth
14
-
15
- == Stand-Alone Example
16
-
17
- Use the strategy as a middleware in your application:
18
-
19
- require 'omniauth/oauth'
20
-
21
- use OmniAuth::Strategies::Twitter, 'consumer_key', 'consumer_secret'
22
-
23
- Then simply direct users to '/auth/twitter' to have them authenticate via Twitter.
24
-
25
- == OmniAuth Builder
26
-
27
- If you want to allow multiple providers, use the OmniAuth Builder:
28
-
29
- require 'omniauth/oauth'
30
-
31
- use OmniAuth::Builder do
32
- provider :twitter, 'consumer_key', 'consumer_secret'
33
- provider :facebook, 'client_id', 'client_secret'
34
- end
35
-
data/oa-oauth/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
- require 'rspec/core/rake_task'
4
- RSpec::Core::RakeTask.new(:spec)
5
- task :default => :spec
6
- task :test => :spec
@@ -1 +0,0 @@
1
- Autotest.add_discovery { "rspec2" }
@@ -1 +0,0 @@
1
- require 'omniauth/oauth'
@@ -1,56 +0,0 @@
1
- require 'omniauth/core'
2
-
3
- module OmniAuth
4
- module Strategies
5
- autoload :OAuth, 'omniauth/strategies/oauth'
6
- autoload :OAuth2, 'omniauth/strategies/oauth2'
7
- autoload :XAuth, 'omniauth/strategies/xauth'
8
-
9
- autoload :Bitly, 'omniauth/strategies/bitly'
10
- autoload :Dailymile, 'omniauth/strategies/dailymile'
11
- autoload :Doit, 'omniauth/strategies/doit'
12
- autoload :Dopplr, 'omniauth/strategies/dopplr'
13
- autoload :Douban, 'omniauth/strategies/douban'
14
- autoload :Evernote, 'omniauth/strategies/evernote'
15
- autoload :Facebook, 'omniauth/strategies/facebook'
16
- autoload :Foursquare, 'omniauth/strategies/foursquare'
17
- autoload :GitHub, 'omniauth/strategies/github'
18
- autoload :Goodreads, 'omniauth/strategies/goodreads'
19
- autoload :Google, 'omniauth/strategies/google'
20
- autoload :Gowalla, 'omniauth/strategies/gowalla'
21
- autoload :Hyves, 'omniauth/strategies/hyves'
22
- autoload :Identica, 'omniauth/strategies/identica'
23
- autoload :Instagram, 'omniauth/strategies/instagram'
24
- autoload :Instapaper, 'omniauth/strategies/instapaper'
25
- autoload :LinkedIn, 'omniauth/strategies/linked_in'
26
- autoload :Meetup, 'omniauth/strategies/meetup'
27
- autoload :Miso, 'omniauth/strategies/miso'
28
- autoload :Mixi, 'omniauth/strategies/mixi'
29
- autoload :Netflix, 'omniauth/strategies/netflix'
30
- autoload :Qzone, 'omniauth/strategies/qzone'
31
- autoload :Plurk, 'omniauth/strategies/plurk'
32
- autoload :Rdio, 'omniauth/strategies/rdio'
33
- autoload :Renren, 'omniauth/strategies/renren'
34
- autoload :Salesforce, 'omniauth/strategies/salesforce'
35
- autoload :SmugMug, 'omniauth/strategies/smug_mug'
36
- autoload :SoundCloud, 'omniauth/strategies/sound_cloud'
37
- autoload :T163, 'omniauth/strategies/t163'
38
- autoload :TB, 'omniauth/strategies/taobao'
39
- autoload :Teambox, 'omniauth/strategies/teambox'
40
- autoload :ThirtySevenSignals, 'omniauth/strategies/thirty_seven_signals'
41
- autoload :Tqq, 'omniauth/strategies/tqq'
42
- autoload :TradeMe, 'omniauth/strategies/trade_me'
43
- autoload :TripIt, 'omniauth/strategies/trip_it'
44
- autoload :Tsina, 'omniauth/strategies/tsina'
45
- autoload :Tsohu, 'omniauth/strategies/tsohu'
46
- autoload :Tumblr, 'omniauth/strategies/tumblr'
47
- autoload :Twitter, 'omniauth/strategies/twitter'
48
- autoload :TypePad, 'omniauth/strategies/type_pad'
49
- autoload :Vimeo, 'omniauth/strategies/vimeo'
50
- autoload :Vkontakte, 'omniauth/strategies/vkontakte'
51
- autoload :Yahoo, 'omniauth/strategies/yahoo'
52
- autoload :Yammer, 'omniauth/strategies/yammer'
53
- autoload :YouTube, 'omniauth/strategies/you_tube'
54
- autoload :Mailru, 'omniauth/strategies/mailru'
55
- end
56
- end
@@ -1,46 +0,0 @@
1
- require 'omniauth/oauth'
2
- require 'multi_json'
3
-
4
- module OmniAuth
5
- module Strategies
6
- #
7
- # Authenticate to Bitly utilizing OAuth 2.0 and retrieve
8
- # basic user information.
9
- #
10
- # @example Basic Usage
11
- # use OmniAuth::Strategies::Bitly, 'API Key', 'Secret Key'
12
- class Bitly < OAuth2
13
- # @param [Rack Application] app standard middleware application parameter
14
- # @param [String] api_key the application id as [registered on Bitly](http://bit.ly/a/account)
15
- # @param [String] secret_key the application secret as [registered on Bitly](http://bit.ly/a/account)
16
- def initialize(app, api_key = nil, secret_key = nil, options = {}, &block)
17
- client_options = {
18
- :site => 'https://bit.ly',
19
- :authorize_url => 'https://bit.ly/oauth/authorize',
20
- :access_token_url => 'https://api-ssl.bit.ly/oauth/access_token'
21
- }
22
-
23
- super(app, :bitly, api_key, secret_key, client_options, options, &block)
24
- end
25
-
26
- protected
27
-
28
- def user_data
29
- {
30
- 'login' => @access_token['login'],
31
- 'api_key' => @access_token['apiKey']
32
- }
33
- end
34
-
35
- def auth_hash
36
- OmniAuth::Utils.deep_merge(super, {
37
- 'uid' => @access_token['login'],
38
- 'user_info' => user_data,
39
- 'extra' => {'user_hash' => user_data}
40
- })
41
- end
42
- end
43
-
44
- end
45
-
46
- end
@@ -1,64 +0,0 @@
1
- require 'omniauth/oauth'
2
- require 'multi_json'
3
-
4
- module OmniAuth
5
- module Strategies
6
- #
7
- # Authenticate to DailyMile utilizing OAuth 2.0 and retrieve
8
- # basic user information.
9
- #
10
- # @example Basic Usage
11
- # use OmniAuth::Strategies::DailyMile, 'CLIENT_ID', 'CLIENT_SECRET'
12
- class Dailymile < OAuth2
13
- # @param [Rack Application] app standard middleware application parameter
14
- # @param [String] client_id the application id as [registered on Dailymile](http://www.dailymile.com/api/consumers/new)
15
- # @param [String] cliend_secret the application secret as [registered on Dailymile](http://www.dailymile.com/api/consumers/new)
16
- def initialize(app, client_id = nil, client_secret = nil, options = {}, &block)
17
- client_options = {
18
- :site => 'https://api.dailymile.com/oauth',
19
- :authorize_path => '/oauth/authorize',
20
- :access_token_path => '/oauth/token'
21
- }
22
-
23
- super(app, :dailymile, client_id, client_secret, client_options, options, &block)
24
- end
25
-
26
- protected
27
-
28
- def user_data
29
- @data ||= MultiJson.decode(@access_token.get("/people/me.json"))
30
- end
31
-
32
- def request_phase
33
- options[:response_type] ||= 'code'
34
- super
35
- end
36
-
37
- def callback_phase
38
- options[:grant_type] ||= 'authorization_code'
39
- super
40
- end
41
-
42
- def user_info
43
- {
44
- 'name' => user_data['display_name'],
45
- 'nickname' => user_data['username'],
46
- 'location' => user_data['location'],
47
- 'image' => user_data['photo_url'],
48
- 'description' => user_data['goal'],
49
- 'urls' => {
50
- 'dailymile' => user_data['url']
51
- }
52
- }
53
- end
54
-
55
- def auth_hash
56
- OmniAuth::Utils.deep_merge(super, {
57
- 'uid' => user_data["url"].split('/').last,
58
- 'user_info' => user_info,
59
- 'extra' => {'user_hash' => user_data}
60
- })
61
- end
62
- end
63
- end
64
- end