omniauth-openid 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -10,7 +10,7 @@ Provides strategies for authenticating to providers using the OpenID standard.
10
10
 
11
11
  Use the strategy as a middleware in your application:
12
12
 
13
- require 'omniauth/openid'
13
+ require 'omniauth-openid'
14
14
  require 'openid/store/filesystem'
15
15
 
16
16
  use Rack::Session::Cookie
@@ -24,7 +24,7 @@ A list of all OpenID stores is available at http://github.com/openid/ruby-openid
24
24
 
25
25
  If OpenID is one of several authentication strategies, use the OmniAuth Builder:
26
26
 
27
- require 'omniauth/openid'
27
+ require 'omniauth-openid'
28
28
  require 'openid/store/filesystem'
29
29
 
30
30
  use OmniAuth::Builder do
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module OpenID
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-11-02 00:00:00.000000000Z
13
+ date: 2011-11-04 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: omniauth
17
- requirement: &70352060651980 !ruby/object:Gem::Requirement
17
+ requirement: &70221645863580 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '1.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70352060651980
25
+ version_requirements: *70221645863580
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rack-openid
28
- requirement: &70352060650760 !ruby/object:Gem::Requirement
28
+ requirement: &70221645858920 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.3.1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70352060650760
36
+ version_requirements: *70221645858920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rack-test
39
- requirement: &70352060649280 !ruby/object:Gem::Requirement
39
+ requirement: &70221645855080 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0.5'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70352060649280
47
+ version_requirements: *70221645855080
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
- requirement: &70352060646420 !ruby/object:Gem::Requirement
50
+ requirement: &70221645849280 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0.8'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70352060646420
58
+ version_requirements: *70221645849280
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rdiscount
61
- requirement: &70352060644280 !ruby/object:Gem::Requirement
61
+ requirement: &70221645846800 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '1.6'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70352060644280
69
+ version_requirements: *70221645846800
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
- requirement: &70352060641340 !ruby/object:Gem::Requirement
72
+ requirement: &70221645842660 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '2.7'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70352060641340
80
+ version_requirements: *70221645842660
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: simplecov
83
- requirement: &70352060640020 !ruby/object:Gem::Requirement
83
+ requirement: &70221645838580 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0.4'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70352060640020
91
+ version_requirements: *70221645838580
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: webmock
94
- requirement: &70352060637800 !ruby/object:Gem::Requirement
94
+ requirement: &70221645833400 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '1.7'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70352060637800
102
+ version_requirements: *70221645833400
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: yard
105
- requirement: &70352060627560 !ruby/object:Gem::Requirement
105
+ requirement: &70221645830920 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: '0.7'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70352060627560
113
+ version_requirements: *70221645830920
114
114
  description: OpenID strategy for OmniAuth.
115
115
  email:
116
116
  - michael@intridea.com
@@ -130,11 +130,8 @@ files:
130
130
  - README.md
131
131
  - Rakefile
132
132
  - examples/sinatra.rb
133
- - lib/oa-openid.rb
134
133
  - lib/omniauth-openid.rb
135
134
  - lib/omniauth-openid/version.rb
136
- - lib/omniauth/strategies/google_apps.rb
137
- - lib/omniauth/strategies/google_hybrid.rb
138
135
  - lib/omniauth/strategies/open_id.rb
139
136
  - lib/omniauth/strategies/steam.rb
140
137
  - omniauth-openid.gemspec
@@ -1 +0,0 @@
1
- require 'omniauth/openid'
@@ -1,23 +0,0 @@
1
- require 'omniauth/openid'
2
-
3
- module OmniAuth
4
- module Strategies
5
- class GoogleApps < OmniAuth::Strategies::OpenID
6
- def initialize(app, store = nil, options = {}, &block)
7
- options[:name] ||= 'google_apps'
8
- super(app, store, options, &block)
9
- end
10
-
11
- def get_identifier
12
- OmniAuth::Form.build(:title => 'Google Apps Authentication') do
13
- label_field('Google Apps Domain', 'domain')
14
- input_field('url', 'domain')
15
- end.to_response
16
- end
17
-
18
- def identifier
19
- options[:domain] || request['domain']
20
- end
21
- end
22
- end
23
- end
@@ -1,55 +0,0 @@
1
- require 'rack/openid'
2
- require 'omniauth/openid'
3
- require 'oauth'
4
-
5
- module OmniAuth
6
- module Strategies
7
- # OmniAuth strategy for connecting to Google via the OpenID+OAuth Hybrid Protocol.
8
- # For help, check the example implementation on https://github.com/boyvanamstel/Google-Hybrid-Omniauth-implementation
9
- class GoogleHybrid < OmniAuth::Strategies::OpenID
10
-
11
- protected
12
-
13
- def dummy_app
14
- lambda{|env| [401, {"WWW-Authenticate" => Rack::OpenID.build_header(
15
- :identifier => identifier,
16
- :return_to => callback_url,
17
- :required => @options[:required],
18
- :optional => @options[:optional],
19
- :"oauth[consumer]" => @options[:consumer_key],
20
- :"oauth[scope]" => @options[:scope],
21
- :method => 'post'
22
- )}, []]}
23
- end
24
-
25
- def auth_hash
26
- # Based on https://gist.github.com/569650 by nov
27
- oauth_response = ::OpenID::OAuth::Response.from_success_response(@openid_response)
28
-
29
- consumer = ::OAuth::Consumer.new(
30
- @options[:consumer_key],
31
- @options[:consumer_secret],
32
- :site => 'https://www.google.com',
33
- :access_token_path => '/accounts/OAuthGetAccessToken'
34
- )
35
- request_token = ::OAuth::RequestToken.new(
36
- consumer,
37
- oauth_response.request_token,
38
- "" # OAuth request token secret is also blank in OpenID/OAuth Hybrid
39
- )
40
- @access_token = request_token.get_access_token
41
-
42
- OmniAuth::Utils.deep_merge(super(), {
43
- 'uid' => @openid_response.display_identifier,
44
- 'user_info' => user_info(@openid_response),
45
- 'credentials' => {
46
- 'scope' => @options[:scope],
47
- 'token' => @access_token.token,
48
- 'secret' => @access_token.secret
49
- }
50
- })
51
- end
52
- end
53
- end
54
- end
55
-