devise_openid_authenticatable 1.0.0.beta2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/Gemfile +18 -10
- data/Rakefile +0 -2
- data/VERSION +1 -1
- data/devise_openid_authenticatable.gemspec +65 -68
- data/lib/devise_openid_authenticatable/strategy.rb +1 -0
- data/spec/strategy_spec.rb +2 -2
- metadata +23 -27
- data/.gitignore +0 -6
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
== 1.0.0.beta2
|
2
|
+
* Fix a typo that was breaking all apps using create_from_identity_url.
|
3
|
+
|
1
4
|
== 1.0.0.beta1
|
2
5
|
* Implement support for build_from_identity_url. create_from_identity_url is now deprecated.
|
3
6
|
* build_from_identity_url should return a new, unsaved model instance rather than a persisted one.
|
data/Gemfile
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
gem 'rails', '3.0.0'
|
4
|
-
gem "devise", ">= 1.1.2"
|
5
|
-
gem "rspec", "~> 2.3"
|
6
|
-
gem "rspec-rails", "~> 2.3"
|
7
3
|
gem "rack-openid", ">= 1.2.0"
|
8
|
-
gem "
|
9
|
-
|
10
|
-
|
11
|
-
gem
|
12
|
-
gem "
|
13
|
-
gem "
|
4
|
+
gem "devise", ">= 1.0.6"
|
5
|
+
|
6
|
+
group :test do
|
7
|
+
gem 'rails', '3.0.0'
|
8
|
+
gem "rspec", "~> 2.3"
|
9
|
+
gem "rspec-rails", "~> 2.3"
|
10
|
+
gem "mocha"
|
11
|
+
gem "sqlite3-ruby"
|
12
|
+
gem "rots", :git => "http://github.com/roman/rots.git"
|
13
|
+
gem "sham_rack"
|
14
|
+
gem "webrat"
|
15
|
+
|
16
|
+
if RUBY_VERSION.start_with? '1.9'
|
17
|
+
gem "ruby-debug19"
|
18
|
+
else
|
19
|
+
gem "ruby-debug"
|
20
|
+
end
|
21
|
+
end
|
data/Rakefile
CHANGED
@@ -26,8 +26,6 @@ begin
|
|
26
26
|
gemspec.email = "natbudin@gmail.com"
|
27
27
|
gemspec.homepage = "http://github.com/nbudin/devise_openid_authenticatable"
|
28
28
|
gemspec.authors = ["Nat Budin"]
|
29
|
-
gemspec.add_runtime_dependency "devise", ">= 1.0.6"
|
30
|
-
gemspec.add_runtime_dependency "rack-openid", ">= 1.2.0"
|
31
29
|
end
|
32
30
|
Jeweler::GemcutterTasks.new
|
33
31
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0
|
1
|
+
1.0.0
|
@@ -1,103 +1,100 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{devise_openid_authenticatable}
|
8
|
-
s.version = "1.0.0
|
8
|
+
s.version = "1.0.0"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nat Budin"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-05-31}
|
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 = [
|
16
16
|
"README.md"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
-
".
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
"spec/support/migrations.rb"
|
19
|
+
"CHANGELOG.rdoc",
|
20
|
+
"Gemfile",
|
21
|
+
"README.md",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"devise_openid_authenticatable.gemspec",
|
25
|
+
"lib/devise_openid_authenticatable.rb",
|
26
|
+
"lib/devise_openid_authenticatable/model.rb",
|
27
|
+
"lib/devise_openid_authenticatable/routes.rb",
|
28
|
+
"lib/devise_openid_authenticatable/schema.rb",
|
29
|
+
"lib/devise_openid_authenticatable/strategy.rb",
|
30
|
+
"rails/init.rb",
|
31
|
+
"spec/model_spec.rb",
|
32
|
+
"spec/scenario/app/controllers/application_controller.rb",
|
33
|
+
"spec/scenario/app/controllers/home_controller.rb",
|
34
|
+
"spec/scenario/app/controllers/sessions_controller.rb",
|
35
|
+
"spec/scenario/app/models/database_user.rb",
|
36
|
+
"spec/scenario/app/models/legacy_user.rb",
|
37
|
+
"spec/scenario/app/models/user.rb",
|
38
|
+
"spec/scenario/app/views/layouts/application.html.erb",
|
39
|
+
"spec/scenario/app/views/sessions/new.html.erb",
|
40
|
+
"spec/scenario/config.ru",
|
41
|
+
"spec/scenario/config/application.rb",
|
42
|
+
"spec/scenario/config/boot.rb",
|
43
|
+
"spec/scenario/config/database.yml",
|
44
|
+
"spec/scenario/config/environment.rb",
|
45
|
+
"spec/scenario/config/environments/development.rb",
|
46
|
+
"spec/scenario/config/environments/test.rb",
|
47
|
+
"spec/scenario/config/initializers/backtrace_silencers.rb",
|
48
|
+
"spec/scenario/config/initializers/inflections.rb",
|
49
|
+
"spec/scenario/config/initializers/secret_token.rb",
|
50
|
+
"spec/scenario/config/routes.rb",
|
51
|
+
"spec/scenario/db/migrate/20100401102949_create_tables.rb",
|
52
|
+
"spec/scenario/db/schema.rb",
|
53
|
+
"spec/spec_helper.rb",
|
54
|
+
"spec/strategy_spec.rb",
|
55
|
+
"spec/support/migrations.rb"
|
57
56
|
]
|
58
57
|
s.homepage = %q{http://github.com/nbudin/devise_openid_authenticatable}
|
59
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
60
58
|
s.require_paths = ["lib"]
|
61
|
-
s.rubygems_version = %q{1.
|
59
|
+
s.rubygems_version = %q{1.5.0}
|
62
60
|
s.summary = %q{OpenID authentication module for Devise}
|
63
61
|
s.test_files = [
|
64
62
|
"spec/model_spec.rb",
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
63
|
+
"spec/scenario/app/controllers/application_controller.rb",
|
64
|
+
"spec/scenario/app/controllers/home_controller.rb",
|
65
|
+
"spec/scenario/app/controllers/sessions_controller.rb",
|
66
|
+
"spec/scenario/app/models/database_user.rb",
|
67
|
+
"spec/scenario/app/models/legacy_user.rb",
|
68
|
+
"spec/scenario/app/models/user.rb",
|
69
|
+
"spec/scenario/config/application.rb",
|
70
|
+
"spec/scenario/config/boot.rb",
|
71
|
+
"spec/scenario/config/environment.rb",
|
72
|
+
"spec/scenario/config/environments/development.rb",
|
73
|
+
"spec/scenario/config/environments/test.rb",
|
74
|
+
"spec/scenario/config/initializers/backtrace_silencers.rb",
|
75
|
+
"spec/scenario/config/initializers/inflections.rb",
|
76
|
+
"spec/scenario/config/initializers/secret_token.rb",
|
77
|
+
"spec/scenario/config/routes.rb",
|
78
|
+
"spec/scenario/db/migrate/20100401102949_create_tables.rb",
|
79
|
+
"spec/scenario/db/schema.rb",
|
80
|
+
"spec/spec_helper.rb",
|
81
|
+
"spec/strategy_spec.rb",
|
82
|
+
"spec/support/migrations.rb"
|
85
83
|
]
|
86
84
|
|
87
85
|
if s.respond_to? :specification_version then
|
88
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
89
86
|
s.specification_version = 3
|
90
87
|
|
91
88
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
92
|
-
s.add_runtime_dependency(%q<devise>, [">= 1.0.6"])
|
93
89
|
s.add_runtime_dependency(%q<rack-openid>, [">= 1.2.0"])
|
90
|
+
s.add_runtime_dependency(%q<devise>, [">= 1.0.6"])
|
94
91
|
else
|
95
|
-
s.add_dependency(%q<devise>, [">= 1.0.6"])
|
96
92
|
s.add_dependency(%q<rack-openid>, [">= 1.2.0"])
|
93
|
+
s.add_dependency(%q<devise>, [">= 1.0.6"])
|
97
94
|
end
|
98
95
|
else
|
99
|
-
s.add_dependency(%q<devise>, [">= 1.0.6"])
|
100
96
|
s.add_dependency(%q<rack-openid>, [">= 1.2.0"])
|
97
|
+
s.add_dependency(%q<devise>, [">= 1.0.6"])
|
101
98
|
end
|
102
99
|
end
|
103
100
|
|
@@ -20,6 +20,7 @@ class Devise::Strategies::OpenidAuthenticatable < base_class
|
|
20
20
|
handle_response!
|
21
21
|
else # Delegate authentication to Rack::OpenID by throwing a 401
|
22
22
|
opts = { :identifier => params[scope]["identity_url"], :return_to => return_url, :trust_root => trust_root, :method => 'post' }
|
23
|
+
opts[:immediate] = true if params[scope]["immediate"]
|
23
24
|
opts[:optional] = mapping.to.openid_optional_fields if mapping.to.respond_to?(:openid_optional_fields)
|
24
25
|
opts[:required] = mapping.to.openid_required_fields if mapping.to.respond_to?(:openid_required_fields)
|
25
26
|
custom! [401, { Rack::OpenID::AUTHENTICATE_HEADER => Rack::OpenID.build_header(opts) }, "Sign in with OpenID"]
|
data/spec/strategy_spec.rb
CHANGED
@@ -95,7 +95,7 @@ describe Devise::Strategies::OpenidAuthenticatable do
|
|
95
95
|
|
96
96
|
describe "POST /users/sign_in (with a valid identity URL param)" do
|
97
97
|
before do
|
98
|
-
Rack::OpenID.any_instance.stubs(:begin_authentication).returns([302, {'location' => 'http://openid.example.org/server'}, ''])
|
98
|
+
Rack::OpenID.any_instance.stubs(:begin_authentication).returns([302, {'location' => 'http://openid.example.org/server'}, ['']])
|
99
99
|
post '/users/sign_in', 'user' => { 'identity_url' => 'http://openid.example.org/myid' }
|
100
100
|
end
|
101
101
|
|
@@ -262,7 +262,7 @@ describe Devise::Strategies::OpenidAuthenticatable do
|
|
262
262
|
|
263
263
|
describe "POST /database_users/sign_in (using OpenID, begin_authentication)" do
|
264
264
|
before do
|
265
|
-
Rack::OpenID.any_instance.stubs(:begin_authentication).returns([302, {'location' => 'http://openid.example.org/server'}, ''])
|
265
|
+
Rack::OpenID.any_instance.stubs(:begin_authentication).returns([302, {'location' => 'http://openid.example.org/server'}, ['']])
|
266
266
|
post '/database_users/sign_in', 'database_user' => { 'identity_url' => 'http://openid.example.org/myid' }
|
267
267
|
end
|
268
268
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_openid_authenticatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
|
11
|
-
version: 1.0.0.beta2
|
10
|
+
version: 1.0.0
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Nat Budin
|
@@ -16,41 +15,41 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date:
|
18
|
+
date: 2011-05-31 00:00:00 -04:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
|
-
|
24
|
-
prerelease: false
|
22
|
+
type: :runtime
|
25
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
24
|
none: false
|
27
25
|
requirements:
|
28
26
|
- - ">="
|
29
27
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
28
|
+
hash: 31
|
31
29
|
segments:
|
32
30
|
- 1
|
31
|
+
- 2
|
33
32
|
- 0
|
34
|
-
|
35
|
-
version: 1.0.6
|
36
|
-
type: :runtime
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version: 1.2.0
|
39
34
|
name: rack-openid
|
35
|
+
version_requirements: *id001
|
40
36
|
prerelease: false
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
41
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
40
|
none: false
|
43
41
|
requirements:
|
44
42
|
- - ">="
|
45
43
|
- !ruby/object:Gem::Version
|
46
|
-
hash:
|
44
|
+
hash: 27
|
47
45
|
segments:
|
48
46
|
- 1
|
49
|
-
- 2
|
50
47
|
- 0
|
51
|
-
|
52
|
-
|
48
|
+
- 6
|
49
|
+
version: 1.0.6
|
50
|
+
name: devise
|
53
51
|
version_requirements: *id002
|
52
|
+
prerelease: false
|
54
53
|
description: OpenID authentication module for Devise using Rack::OpenID
|
55
54
|
email: natbudin@gmail.com
|
56
55
|
executables: []
|
@@ -60,7 +59,6 @@ extensions: []
|
|
60
59
|
extra_rdoc_files:
|
61
60
|
- README.md
|
62
61
|
files:
|
63
|
-
- .gitignore
|
64
62
|
- CHANGELOG.rdoc
|
65
63
|
- Gemfile
|
66
64
|
- README.md
|
@@ -103,8 +101,8 @@ homepage: http://github.com/nbudin/devise_openid_authenticatable
|
|
103
101
|
licenses: []
|
104
102
|
|
105
103
|
post_install_message:
|
106
|
-
rdoc_options:
|
107
|
-
|
104
|
+
rdoc_options: []
|
105
|
+
|
108
106
|
require_paths:
|
109
107
|
- lib
|
110
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -119,18 +117,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
118
|
none: false
|
121
119
|
requirements:
|
122
|
-
- - "
|
120
|
+
- - ">="
|
123
121
|
- !ruby/object:Gem::Version
|
124
|
-
hash:
|
122
|
+
hash: 3
|
125
123
|
segments:
|
126
|
-
-
|
127
|
-
|
128
|
-
- 1
|
129
|
-
version: 1.3.1
|
124
|
+
- 0
|
125
|
+
version: "0"
|
130
126
|
requirements: []
|
131
127
|
|
132
128
|
rubyforge_project:
|
133
|
-
rubygems_version: 1.
|
129
|
+
rubygems_version: 1.5.0
|
134
130
|
signing_key:
|
135
131
|
specification_version: 3
|
136
132
|
summary: OpenID authentication module for Devise
|