devise_openid_authenticatable 1.0.0.alpha2 → 1.0.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha2
1
+ 1.0.0.alpha3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{devise_openid_authenticatable}
8
- s.version = "1.0.0.alpha2"
8
+ s.version = "1.0.0.alpha3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nat Budin"]
12
- s.date = %q{2010-05-24}
12
+ s.date = %q{2010-07-29}
13
13
  s.description = %q{OpenID authentication module for Devise using Rack::OpenID}
14
14
  s.email = %q{natbudin@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -1,5 +1,9 @@
1
1
  Devise::Schema.class_eval do
2
2
  def openid_authenticatable
3
- apply_schema :identity_url, String
3
+ if respond_to?(:apply_devise_schema)
4
+ apply_devise_schema :identity_url, String
5
+ else
6
+ apply_schema :identity_url, String
7
+ end
4
8
  end
5
9
  end
@@ -29,7 +29,16 @@ module Devise
29
29
  fail!("OpenID auth failed")
30
30
  end
31
31
  else
32
- header_data = Rack::OpenID.build_header(:identifier => params[scope]["identity_url"])
32
+ # construct a return URL, preserving all the scope parameters as GET parameters
33
+ return_to = URI.parse(request.url)
34
+ scope_params = {}
35
+ params[scope].each do |k, v|
36
+ scope_params["#{scope}[#{k}]"] = v
37
+ end
38
+ return_to.query = Rack::Utils.build_query(scope_params)
39
+
40
+ header_data = Rack::OpenID.build_header(:identifier => params[scope]["identity_url"], :return_to => return_to.to_s,
41
+ :method => request.method)
33
42
  RAILS_DEFAULT_LOGGER.info header_data
34
43
  custom!([401, {
35
44
  Rack::OpenID::AUTHENTICATE_HEADER => header_data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_openid_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1710980576
4
+ hash: -1710980575
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
- - alpha2
11
- version: 1.0.0.alpha2
10
+ - alpha3
11
+ version: 1.0.0.alpha3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Nat Budin
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-05-24 00:00:00 -04:00
19
+ date: 2010-07-29 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency