oa-openid 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ Use the strategy as a middleware in your application:
21
21
 
22
22
  use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp')
23
23
 
24
- Then simply direct users to '/auth/open_id' to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an <tt>identifier</tt> parameter to the URL (Example: <tt>/auth/open_id?identifier=google.com</tt>).
24
+ Then simply direct users to '/auth/open_id' to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an <tt>identifier</tt> parameter to the URL (Example: <tt>/auth/open_id?openid_url=google.com</tt>).
25
25
 
26
26
  == OmniAuth Builder
27
27
 
@@ -74,21 +74,20 @@ module OmniAuth
74
74
 
75
75
  def callback_phase
76
76
  env['REQUEST_METHOD'] = 'GET'
77
-
78
77
  openid = Rack::OpenID.new(lambda{|env| [200,{},[]]}, @store)
79
78
  openid.call(env)
80
- resp = env.delete('rack.openid.response')
81
- if resp && resp.status == :success
79
+ @openid_response = env.delete('rack.openid.response')
80
+ if @openid_response && @openid_response.status == :success
82
81
  super
83
82
  else
84
83
  fail!(:invalid_credentials)
85
84
  end
86
85
  end
87
86
 
88
- def auth_hash(response)
87
+ def auth_hash
89
88
  OmniAuth::Utils.deep_merge(super(), {
90
- 'uid' => response.display_identifier,
91
- 'user_info' => user_info(response)
89
+ 'uid' => @openid_response.display_identifier,
90
+ 'user_info' => user_info(@openid_response)
92
91
  })
93
92
  end
94
93
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oa-openid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Bleigh
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-06 00:00:00 -05:00
18
+ date: 2010-10-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,12 +24,12 @@ dependencies:
24
24
  requirements:
25
25
  - - "="
26
26
  - !ruby/object:Gem::Version
27
- hash: 31
27
+ hash: 29
28
28
  segments:
29
29
  - 0
30
30
  - 1
31
- - 2
32
- version: 0.1.2
31
+ - 3
32
+ version: 0.1.3
33
33
  requirement: *id001
34
34
  name: oa-core
35
35
  prerelease: false