sorcery 0.16.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -1
- data/README.md +9 -8
- data/lib/generators/sorcery/helpers.rb +1 -1
- data/lib/generators/sorcery/install_generator.rb +9 -11
- data/lib/generators/sorcery/templates/initializer.rb +34 -10
- data/lib/generators/sorcery/templates/migration/core.rb +1 -3
- data/lib/sorcery/adapters/active_record_adapter.rb +12 -14
- data/lib/sorcery/adapters/mongoid_adapter.rb +7 -9
- data/lib/sorcery/controller/config.rb +27 -29
- data/lib/sorcery/controller/submodules/activity_logging.rb +4 -7
- data/lib/sorcery/controller/submodules/brute_force_protection.rb +4 -1
- data/lib/sorcery/controller/submodules/external.rb +12 -12
- data/lib/sorcery/controller/submodules/http_basic_auth.rb +7 -2
- data/lib/sorcery/controller/submodules/remember_me.rb +2 -1
- data/lib/sorcery/controller/submodules/session_timeout.rb +2 -2
- data/lib/sorcery/controller.rb +37 -19
- data/lib/sorcery/crypto_providers/aes256.rb +4 -2
- data/lib/sorcery/crypto_providers/bcrypt.rb +2 -1
- data/lib/sorcery/crypto_providers/md5.rb +1 -0
- data/lib/sorcery/crypto_providers/sha1.rb +1 -0
- data/lib/sorcery/crypto_providers/sha256.rb +1 -0
- data/lib/sorcery/crypto_providers/sha512.rb +1 -0
- data/lib/sorcery/engine.rb +6 -4
- data/lib/sorcery/errors.rb +10 -0
- data/lib/sorcery/model/config.rb +20 -31
- data/lib/sorcery/model/submodules/activity_logging.rb +8 -6
- data/lib/sorcery/model/submodules/brute_force_protection.rb +16 -14
- data/lib/sorcery/model/submodules/external.rb +8 -10
- data/lib/sorcery/model/submodules/magic_login.rb +8 -4
- data/lib/sorcery/model/submodules/remember_me.rb +3 -3
- data/lib/sorcery/model/submodules/reset_password.rb +23 -13
- data/lib/sorcery/model/submodules/user_activation.rb +19 -17
- data/lib/sorcery/model/temporary_token.rb +5 -5
- data/lib/sorcery/model.rb +29 -28
- data/lib/sorcery/protocols/oauth2.rb +1 -0
- data/lib/sorcery/providers/base.rb +1 -1
- data/lib/sorcery/providers/facebook.rb +2 -2
- data/lib/sorcery/providers/github.rb +3 -3
- data/lib/sorcery/providers/heroku.rb +1 -2
- data/lib/sorcery/providers/jira.rb +3 -2
- data/lib/sorcery/providers/line.rb +2 -4
- data/lib/sorcery/providers/microsoft.rb +1 -1
- data/lib/sorcery/providers/slack.rb +1 -1
- data/lib/sorcery/providers/twitter.rb +2 -2
- data/lib/sorcery/providers/vk.rb +4 -4
- data/lib/sorcery/providers/xing.rb +3 -2
- data/lib/sorcery/test_helpers/internal/rails.rb +5 -22
- data/lib/sorcery/test_helpers/internal.rb +4 -6
- data/lib/sorcery/test_helpers/rails/integration.rb +1 -1
- data/lib/sorcery/test_helpers/rails/request.rb +1 -1
- data/lib/sorcery/version.rb +1 -1
- data/lib/sorcery.rb +6 -1
- metadata +23 -157
- data/.document +0 -5
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- data/.github/workflows/ruby.yml +0 -49
- data/.gitignore +0 -59
- data/.rspec +0 -1
- data/.rubocop.yml +0 -55
- data/.rubocop_todo.yml +0 -163
- data/CODE_OF_CONDUCT.md +0 -14
- data/Gemfile +0 -8
- data/Rakefile +0 -8
- data/SECURITY.md +0 -19
- data/gemfiles/rails_52.gemfile +0 -7
- data/gemfiles/rails_60.gemfile +0 -7
- data/sorcery.gemspec +0 -49
- data/spec/active_record/user_activation_spec.rb +0 -17
- data/spec/active_record/user_activity_logging_spec.rb +0 -15
- data/spec/active_record/user_brute_force_protection_spec.rb +0 -15
- data/spec/active_record/user_magic_login_spec.rb +0 -15
- data/spec/active_record/user_oauth_spec.rb +0 -15
- data/spec/active_record/user_remember_me_spec.rb +0 -15
- data/spec/active_record/user_reset_password_spec.rb +0 -15
- data/spec/active_record/user_spec.rb +0 -27
- data/spec/controllers/controller_activity_logging_spec.rb +0 -113
- data/spec/controllers/controller_brute_force_protection_spec.rb +0 -41
- data/spec/controllers/controller_http_basic_auth_spec.rb +0 -67
- data/spec/controllers/controller_oauth2_spec.rb +0 -568
- data/spec/controllers/controller_oauth_spec.rb +0 -266
- data/spec/controllers/controller_remember_me_spec.rb +0 -130
- data/spec/controllers/controller_session_timeout_spec.rb +0 -166
- data/spec/controllers/controller_spec.rb +0 -194
- data/spec/orm/active_record.rb +0 -21
- data/spec/providers/example_provider_spec.rb +0 -17
- data/spec/providers/example_spec.rb +0 -17
- data/spec/providers/vk_spec.rb +0 -42
- data/spec/rails_app/app/active_record/authentication.rb +0 -3
- data/spec/rails_app/app/active_record/user.rb +0 -5
- data/spec/rails_app/app/active_record/user_provider.rb +0 -3
- data/spec/rails_app/app/assets/config/manifest.js +0 -1
- data/spec/rails_app/app/controllers/application_controller.rb +0 -2
- data/spec/rails_app/app/controllers/sorcery_controller.rb +0 -489
- data/spec/rails_app/app/helpers/application_helper.rb +0 -2
- data/spec/rails_app/app/mailers/sorcery_mailer.rb +0 -38
- data/spec/rails_app/app/views/application/index.html.erb +0 -17
- data/spec/rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/rails_app/app/views/sorcery_mailer/activation_email.html.erb +0 -17
- data/spec/rails_app/app/views/sorcery_mailer/activation_email.text.erb +0 -9
- data/spec/rails_app/app/views/sorcery_mailer/activation_needed_email.html.erb +0 -17
- data/spec/rails_app/app/views/sorcery_mailer/activation_success_email.html.erb +0 -17
- data/spec/rails_app/app/views/sorcery_mailer/activation_success_email.text.erb +0 -9
- data/spec/rails_app/app/views/sorcery_mailer/magic_login_email.html.erb +0 -13
- data/spec/rails_app/app/views/sorcery_mailer/magic_login_email.text.erb +0 -6
- data/spec/rails_app/app/views/sorcery_mailer/reset_password_email.html.erb +0 -16
- data/spec/rails_app/app/views/sorcery_mailer/reset_password_email.text.erb +0 -8
- data/spec/rails_app/app/views/sorcery_mailer/send_unlock_token_email.text.erb +0 -1
- data/spec/rails_app/config/application.rb +0 -61
- data/spec/rails_app/config/boot.rb +0 -4
- data/spec/rails_app/config/database.yml +0 -22
- data/spec/rails_app/config/environment.rb +0 -5
- data/spec/rails_app/config/environments/test.rb +0 -37
- data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails_app/config/initializers/compatible_legacy_migration.rb +0 -11
- data/spec/rails_app/config/initializers/inflections.rb +0 -10
- data/spec/rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/rails_app/config/initializers/session_store.rb +0 -12
- data/spec/rails_app/config/locales/en.yml +0 -5
- data/spec/rails_app/config/routes.rb +0 -81
- data/spec/rails_app/config/secrets.yml +0 -4
- data/spec/rails_app/config.ru +0 -4
- data/spec/rails_app/db/migrate/activation/20101224223622_add_activation_to_users.rb +0 -17
- data/spec/rails_app/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb +0 -19
- data/spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb +0 -13
- data/spec/rails_app/db/migrate/core/20101224223620_create_users.rb +0 -16
- data/spec/rails_app/db/migrate/external/20101224223628_create_authentications_and_user_providers.rb +0 -22
- data/spec/rails_app/db/migrate/invalidate_active_sessions/20180221093235_add_invalidate_active_sessions_before_to_users.rb +0 -9
- data/spec/rails_app/db/migrate/magic_login/20170924151831_add_magic_login_to_users.rb +0 -17
- data/spec/rails_app/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb +0 -15
- data/spec/rails_app/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb +0 -15
- data/spec/rails_app/db/schema.rb +0 -21
- data/spec/rails_app/db/seeds.rb +0 -7
- data/spec/shared_examples/user_activation_shared_examples.rb +0 -361
- data/spec/shared_examples/user_activity_logging_shared_examples.rb +0 -106
- data/spec/shared_examples/user_brute_force_protection_shared_examples.rb +0 -151
- data/spec/shared_examples/user_magic_login_shared_examples.rb +0 -150
- data/spec/shared_examples/user_oauth_shared_examples.rb +0 -33
- data/spec/shared_examples/user_remember_me_shared_examples.rb +0 -129
- data/spec/shared_examples/user_reset_password_shared_examples.rb +0 -358
- data/spec/shared_examples/user_shared_examples.rb +0 -678
- data/spec/sorcery_crypto_providers_spec.rb +0 -245
- data/spec/sorcery_temporary_token_spec.rb +0 -27
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -50
- data/spec/support/migration_helper.rb +0 -29
- data/spec/support/providers/example.rb +0 -11
- data/spec/support/providers/example_provider.rb +0 -11
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorcery
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Noam Ben Ari
|
|
@@ -9,10 +9,9 @@ authors:
|
|
|
9
9
|
- Grzegorz Witek
|
|
10
10
|
- Chase Gilliam
|
|
11
11
|
- Josh Buker
|
|
12
|
-
autorequire:
|
|
13
12
|
bindir: bin
|
|
14
13
|
cert_chain: []
|
|
15
|
-
date:
|
|
14
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
16
15
|
dependencies:
|
|
17
16
|
- !ruby/object:Gem::Dependency
|
|
18
17
|
name: bcrypt
|
|
@@ -32,72 +31,60 @@ dependencies:
|
|
|
32
31
|
name: oauth
|
|
33
32
|
requirement: !ruby/object:Gem::Requirement
|
|
34
33
|
requirements:
|
|
35
|
-
- - "~>"
|
|
36
|
-
- !ruby/object:Gem::Version
|
|
37
|
-
version: '0.5'
|
|
38
34
|
- - ">="
|
|
39
35
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.
|
|
36
|
+
version: '0.6'
|
|
41
37
|
type: :runtime
|
|
42
38
|
prerelease: false
|
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
44
40
|
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.5'
|
|
48
41
|
- - ">="
|
|
49
42
|
- !ruby/object:Gem::Version
|
|
50
|
-
version: 0.
|
|
43
|
+
version: '0.6'
|
|
51
44
|
- !ruby/object:Gem::Dependency
|
|
52
45
|
name: oauth2
|
|
53
46
|
requirement: !ruby/object:Gem::Requirement
|
|
54
47
|
requirements:
|
|
55
48
|
- - "~>"
|
|
56
49
|
- !ruby/object:Gem::Version
|
|
57
|
-
version: '
|
|
58
|
-
- - ">="
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: 0.8.0
|
|
50
|
+
version: '2.0'
|
|
61
51
|
type: :runtime
|
|
62
52
|
prerelease: false
|
|
63
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
54
|
requirements:
|
|
65
55
|
- - "~>"
|
|
66
56
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '
|
|
68
|
-
- - ">="
|
|
69
|
-
- !ruby/object:Gem::Version
|
|
70
|
-
version: 0.8.0
|
|
57
|
+
version: '2.0'
|
|
71
58
|
- !ruby/object:Gem::Dependency
|
|
72
|
-
name:
|
|
59
|
+
name: railties
|
|
73
60
|
requirement: !ruby/object:Gem::Requirement
|
|
74
61
|
requirements:
|
|
75
|
-
- - "
|
|
62
|
+
- - ">="
|
|
76
63
|
- !ruby/object:Gem::Version
|
|
77
|
-
version:
|
|
78
|
-
type: :
|
|
64
|
+
version: '7.1'
|
|
65
|
+
type: :runtime
|
|
79
66
|
prerelease: false
|
|
80
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
68
|
requirements:
|
|
82
|
-
- - "
|
|
69
|
+
- - ">="
|
|
83
70
|
- !ruby/object:Gem::Version
|
|
84
|
-
version:
|
|
71
|
+
version: '7.1'
|
|
85
72
|
- !ruby/object:Gem::Dependency
|
|
86
|
-
name:
|
|
73
|
+
name: byebug
|
|
87
74
|
requirement: !ruby/object:Gem::Requirement
|
|
88
75
|
requirements:
|
|
89
76
|
- - "~>"
|
|
90
77
|
- !ruby/object:Gem::Version
|
|
91
|
-
version:
|
|
78
|
+
version: 11.1.3
|
|
92
79
|
type: :development
|
|
93
80
|
prerelease: false
|
|
94
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
95
82
|
requirements:
|
|
96
83
|
- - "~>"
|
|
97
84
|
- !ruby/object:Gem::Version
|
|
98
|
-
version:
|
|
85
|
+
version: 11.1.3
|
|
99
86
|
- !ruby/object:Gem::Dependency
|
|
100
|
-
name:
|
|
87
|
+
name: rspec-rails
|
|
101
88
|
requirement: !ruby/object:Gem::Requirement
|
|
102
89
|
requirements:
|
|
103
90
|
- - ">="
|
|
@@ -110,34 +97,6 @@ dependencies:
|
|
|
110
97
|
- - ">="
|
|
111
98
|
- !ruby/object:Gem::Version
|
|
112
99
|
version: '0'
|
|
113
|
-
- !ruby/object:Gem::Dependency
|
|
114
|
-
name: simplecov
|
|
115
|
-
requirement: !ruby/object:Gem::Requirement
|
|
116
|
-
requirements:
|
|
117
|
-
- - ">="
|
|
118
|
-
- !ruby/object:Gem::Version
|
|
119
|
-
version: 0.3.8
|
|
120
|
-
type: :development
|
|
121
|
-
prerelease: false
|
|
122
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
123
|
-
requirements:
|
|
124
|
-
- - ">="
|
|
125
|
-
- !ruby/object:Gem::Version
|
|
126
|
-
version: 0.3.8
|
|
127
|
-
- !ruby/object:Gem::Dependency
|
|
128
|
-
name: test-unit
|
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
|
130
|
-
requirements:
|
|
131
|
-
- - "~>"
|
|
132
|
-
- !ruby/object:Gem::Version
|
|
133
|
-
version: 3.2.0
|
|
134
|
-
type: :development
|
|
135
|
-
prerelease: false
|
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
requirements:
|
|
138
|
-
- - "~>"
|
|
139
|
-
- !ruby/object:Gem::Version
|
|
140
|
-
version: 3.2.0
|
|
141
100
|
- !ruby/object:Gem::Dependency
|
|
142
101
|
name: timecop
|
|
143
102
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -194,24 +153,9 @@ executables: []
|
|
|
194
153
|
extensions: []
|
|
195
154
|
extra_rdoc_files: []
|
|
196
155
|
files:
|
|
197
|
-
- ".document"
|
|
198
|
-
- ".github/FUNDING.yml"
|
|
199
|
-
- ".github/ISSUE_TEMPLATE.md"
|
|
200
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
201
|
-
- ".github/workflows/ruby.yml"
|
|
202
|
-
- ".gitignore"
|
|
203
|
-
- ".rspec"
|
|
204
|
-
- ".rubocop.yml"
|
|
205
|
-
- ".rubocop_todo.yml"
|
|
206
156
|
- CHANGELOG.md
|
|
207
|
-
- CODE_OF_CONDUCT.md
|
|
208
|
-
- Gemfile
|
|
209
157
|
- LICENSE.md
|
|
210
158
|
- README.md
|
|
211
|
-
- Rakefile
|
|
212
|
-
- SECURITY.md
|
|
213
|
-
- gemfiles/rails_52.gemfile
|
|
214
|
-
- gemfiles/rails_60.gemfile
|
|
215
159
|
- lib/generators/sorcery/USAGE
|
|
216
160
|
- lib/generators/sorcery/helpers.rb
|
|
217
161
|
- lib/generators/sorcery/install_generator.rb
|
|
@@ -244,6 +188,7 @@ files:
|
|
|
244
188
|
- lib/sorcery/crypto_providers/sha256.rb
|
|
245
189
|
- lib/sorcery/crypto_providers/sha512.rb
|
|
246
190
|
- lib/sorcery/engine.rb
|
|
191
|
+
- lib/sorcery/errors.rb
|
|
247
192
|
- lib/sorcery/model.rb
|
|
248
193
|
- lib/sorcery/model/config.rb
|
|
249
194
|
- lib/sorcery/model/submodules/activity_logging.rb
|
|
@@ -284,91 +229,13 @@ files:
|
|
|
284
229
|
- lib/sorcery/test_helpers/rails/integration.rb
|
|
285
230
|
- lib/sorcery/test_helpers/rails/request.rb
|
|
286
231
|
- lib/sorcery/version.rb
|
|
287
|
-
- sorcery.gemspec
|
|
288
|
-
- spec/active_record/user_activation_spec.rb
|
|
289
|
-
- spec/active_record/user_activity_logging_spec.rb
|
|
290
|
-
- spec/active_record/user_brute_force_protection_spec.rb
|
|
291
|
-
- spec/active_record/user_magic_login_spec.rb
|
|
292
|
-
- spec/active_record/user_oauth_spec.rb
|
|
293
|
-
- spec/active_record/user_remember_me_spec.rb
|
|
294
|
-
- spec/active_record/user_reset_password_spec.rb
|
|
295
|
-
- spec/active_record/user_spec.rb
|
|
296
|
-
- spec/controllers/controller_activity_logging_spec.rb
|
|
297
|
-
- spec/controllers/controller_brute_force_protection_spec.rb
|
|
298
|
-
- spec/controllers/controller_http_basic_auth_spec.rb
|
|
299
|
-
- spec/controllers/controller_oauth2_spec.rb
|
|
300
|
-
- spec/controllers/controller_oauth_spec.rb
|
|
301
|
-
- spec/controllers/controller_remember_me_spec.rb
|
|
302
|
-
- spec/controllers/controller_session_timeout_spec.rb
|
|
303
|
-
- spec/controllers/controller_spec.rb
|
|
304
|
-
- spec/orm/active_record.rb
|
|
305
|
-
- spec/providers/example_provider_spec.rb
|
|
306
|
-
- spec/providers/example_spec.rb
|
|
307
|
-
- spec/providers/vk_spec.rb
|
|
308
|
-
- spec/rails_app/app/active_record/authentication.rb
|
|
309
|
-
- spec/rails_app/app/active_record/user.rb
|
|
310
|
-
- spec/rails_app/app/active_record/user_provider.rb
|
|
311
|
-
- spec/rails_app/app/assets/config/manifest.js
|
|
312
|
-
- spec/rails_app/app/controllers/application_controller.rb
|
|
313
|
-
- spec/rails_app/app/controllers/sorcery_controller.rb
|
|
314
|
-
- spec/rails_app/app/helpers/application_helper.rb
|
|
315
|
-
- spec/rails_app/app/mailers/sorcery_mailer.rb
|
|
316
|
-
- spec/rails_app/app/views/application/index.html.erb
|
|
317
|
-
- spec/rails_app/app/views/layouts/application.html.erb
|
|
318
|
-
- spec/rails_app/app/views/sorcery_mailer/activation_email.html.erb
|
|
319
|
-
- spec/rails_app/app/views/sorcery_mailer/activation_email.text.erb
|
|
320
|
-
- spec/rails_app/app/views/sorcery_mailer/activation_needed_email.html.erb
|
|
321
|
-
- spec/rails_app/app/views/sorcery_mailer/activation_success_email.html.erb
|
|
322
|
-
- spec/rails_app/app/views/sorcery_mailer/activation_success_email.text.erb
|
|
323
|
-
- spec/rails_app/app/views/sorcery_mailer/magic_login_email.html.erb
|
|
324
|
-
- spec/rails_app/app/views/sorcery_mailer/magic_login_email.text.erb
|
|
325
|
-
- spec/rails_app/app/views/sorcery_mailer/reset_password_email.html.erb
|
|
326
|
-
- spec/rails_app/app/views/sorcery_mailer/reset_password_email.text.erb
|
|
327
|
-
- spec/rails_app/app/views/sorcery_mailer/send_unlock_token_email.text.erb
|
|
328
|
-
- spec/rails_app/config.ru
|
|
329
|
-
- spec/rails_app/config/application.rb
|
|
330
|
-
- spec/rails_app/config/boot.rb
|
|
331
|
-
- spec/rails_app/config/database.yml
|
|
332
|
-
- spec/rails_app/config/environment.rb
|
|
333
|
-
- spec/rails_app/config/environments/test.rb
|
|
334
|
-
- spec/rails_app/config/initializers/backtrace_silencers.rb
|
|
335
|
-
- spec/rails_app/config/initializers/compatible_legacy_migration.rb
|
|
336
|
-
- spec/rails_app/config/initializers/inflections.rb
|
|
337
|
-
- spec/rails_app/config/initializers/mime_types.rb
|
|
338
|
-
- spec/rails_app/config/initializers/session_store.rb
|
|
339
|
-
- spec/rails_app/config/locales/en.yml
|
|
340
|
-
- spec/rails_app/config/routes.rb
|
|
341
|
-
- spec/rails_app/config/secrets.yml
|
|
342
|
-
- spec/rails_app/db/migrate/activation/20101224223622_add_activation_to_users.rb
|
|
343
|
-
- spec/rails_app/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb
|
|
344
|
-
- spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
|
|
345
|
-
- spec/rails_app/db/migrate/core/20101224223620_create_users.rb
|
|
346
|
-
- spec/rails_app/db/migrate/external/20101224223628_create_authentications_and_user_providers.rb
|
|
347
|
-
- spec/rails_app/db/migrate/invalidate_active_sessions/20180221093235_add_invalidate_active_sessions_before_to_users.rb
|
|
348
|
-
- spec/rails_app/db/migrate/magic_login/20170924151831_add_magic_login_to_users.rb
|
|
349
|
-
- spec/rails_app/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb
|
|
350
|
-
- spec/rails_app/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb
|
|
351
|
-
- spec/rails_app/db/schema.rb
|
|
352
|
-
- spec/rails_app/db/seeds.rb
|
|
353
|
-
- spec/shared_examples/user_activation_shared_examples.rb
|
|
354
|
-
- spec/shared_examples/user_activity_logging_shared_examples.rb
|
|
355
|
-
- spec/shared_examples/user_brute_force_protection_shared_examples.rb
|
|
356
|
-
- spec/shared_examples/user_magic_login_shared_examples.rb
|
|
357
|
-
- spec/shared_examples/user_oauth_shared_examples.rb
|
|
358
|
-
- spec/shared_examples/user_remember_me_shared_examples.rb
|
|
359
|
-
- spec/shared_examples/user_reset_password_shared_examples.rb
|
|
360
|
-
- spec/shared_examples/user_shared_examples.rb
|
|
361
|
-
- spec/sorcery_crypto_providers_spec.rb
|
|
362
|
-
- spec/sorcery_temporary_token_spec.rb
|
|
363
|
-
- spec/spec.opts
|
|
364
|
-
- spec/spec_helper.rb
|
|
365
|
-
- spec/support/migration_helper.rb
|
|
366
|
-
- spec/support/providers/example.rb
|
|
367
|
-
- spec/support/providers/example_provider.rb
|
|
368
232
|
homepage: https://github.com/Sorcery/sorcery
|
|
369
233
|
licenses:
|
|
370
234
|
- MIT
|
|
371
|
-
metadata:
|
|
235
|
+
metadata:
|
|
236
|
+
bug_tracker_uri: https://github.com/Sorcery/sorcery/issues
|
|
237
|
+
changelog_uri: https://github.com/Sorcery/sorcery/releases
|
|
238
|
+
rubygems_mfa_required: 'true'
|
|
372
239
|
post_install_message: |-
|
|
373
240
|
As of version 1.0 oauth/oauth2 won't be automatically bundled so you may need to add those dependencies to your Gemfile.
|
|
374
241
|
You may need oauth2 if you use external providers such as any of these: https://github.com/Sorcery/sorcery/tree/master/lib/sorcery/providers
|
|
@@ -379,15 +246,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
379
246
|
requirements:
|
|
380
247
|
- - ">="
|
|
381
248
|
- !ruby/object:Gem::Version
|
|
382
|
-
version: 2.
|
|
249
|
+
version: 3.2.0
|
|
383
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
384
251
|
requirements:
|
|
385
252
|
- - ">="
|
|
386
253
|
- !ruby/object:Gem::Version
|
|
387
254
|
version: '0'
|
|
388
255
|
requirements: []
|
|
389
|
-
rubygems_version: 3.
|
|
390
|
-
signing_key:
|
|
256
|
+
rubygems_version: 3.6.9
|
|
391
257
|
specification_version: 4
|
|
392
258
|
summary: Magical authentication for Rails applications
|
|
393
259
|
test_files: []
|
data/.document
DELETED
data/.github/FUNDING.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
github: athix
|
data/.github/ISSUE_TEMPLATE.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Please complete all sections.
|
|
2
|
-
|
|
3
|
-
### Configuration
|
|
4
|
-
|
|
5
|
-
- Sorcery Version: ``
|
|
6
|
-
- Ruby Version: ``
|
|
7
|
-
- Framework: ``
|
|
8
|
-
- Platform: ``
|
|
9
|
-
|
|
10
|
-
### Expected Behavior
|
|
11
|
-
|
|
12
|
-
Tell us what should happen.
|
|
13
|
-
|
|
14
|
-
### Actual Behavior
|
|
15
|
-
|
|
16
|
-
Tell us what happens instead.
|
|
17
|
-
|
|
18
|
-
### Steps to Reproduce
|
|
19
|
-
|
|
20
|
-
Please list all steps to reproduce the issue.
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Test Suite
|
|
2
|
-
|
|
3
|
-
# Run against all commits and pull requests.
|
|
4
|
-
on: [ push, pull_request ]
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
test_matrix:
|
|
8
|
-
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
strategy:
|
|
12
|
-
fail-fast: false
|
|
13
|
-
matrix:
|
|
14
|
-
ruby:
|
|
15
|
-
- 2.4
|
|
16
|
-
- 2.5
|
|
17
|
-
- 2.6
|
|
18
|
-
- 2.7
|
|
19
|
-
- 3.0
|
|
20
|
-
|
|
21
|
-
rails:
|
|
22
|
-
- '52'
|
|
23
|
-
- '60'
|
|
24
|
-
|
|
25
|
-
exclude:
|
|
26
|
-
- ruby: 2.4
|
|
27
|
-
rails: '60'
|
|
28
|
-
- ruby: 3.0
|
|
29
|
-
rails: '52'
|
|
30
|
-
|
|
31
|
-
env:
|
|
32
|
-
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
|
|
33
|
-
|
|
34
|
-
steps:
|
|
35
|
-
- uses: actions/checkout@v2
|
|
36
|
-
- name: Set up Ruby
|
|
37
|
-
uses: ruby/setup-ruby@v1
|
|
38
|
-
with:
|
|
39
|
-
ruby-version: ${{ matrix.ruby }}
|
|
40
|
-
bundler-cache: true
|
|
41
|
-
- name: Run tests
|
|
42
|
-
run: bundle exec rake spec
|
|
43
|
-
|
|
44
|
-
finish:
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
needs: [ test_matrix ]
|
|
47
|
-
steps:
|
|
48
|
-
- name: Wait for status checks
|
|
49
|
-
run: echo "All Green!"
|
data/.gitignore
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# rcov generated
|
|
2
|
-
coverage
|
|
3
|
-
|
|
4
|
-
# rdoc generated
|
|
5
|
-
rdoc
|
|
6
|
-
|
|
7
|
-
# yard generated
|
|
8
|
-
doc
|
|
9
|
-
.yardoc
|
|
10
|
-
|
|
11
|
-
# bundler
|
|
12
|
-
.bundle
|
|
13
|
-
|
|
14
|
-
# jeweler generated
|
|
15
|
-
pkg
|
|
16
|
-
|
|
17
|
-
# byebug generated
|
|
18
|
-
.byebug_history
|
|
19
|
-
|
|
20
|
-
# for RVM
|
|
21
|
-
.rvmrc
|
|
22
|
-
|
|
23
|
-
# for RubyMine
|
|
24
|
-
.idea
|
|
25
|
-
|
|
26
|
-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
|
27
|
-
#
|
|
28
|
-
# * Create a file at ~/.gitignore
|
|
29
|
-
# * Include files you want ignored
|
|
30
|
-
# * Run: git config --global core.excludesfile ~/.gitignore
|
|
31
|
-
#
|
|
32
|
-
# After doing this, these files will be ignored in all your git projects,
|
|
33
|
-
# saving you from having to 'pollute' every project you touch with them
|
|
34
|
-
#
|
|
35
|
-
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
|
36
|
-
#
|
|
37
|
-
# For MacOS:
|
|
38
|
-
#
|
|
39
|
-
#.DS_Store
|
|
40
|
-
#
|
|
41
|
-
# For TextMate
|
|
42
|
-
#*.tmproj
|
|
43
|
-
tmtags
|
|
44
|
-
#
|
|
45
|
-
# For emacs:
|
|
46
|
-
#*~
|
|
47
|
-
#\#*
|
|
48
|
-
#.\#*
|
|
49
|
-
#
|
|
50
|
-
# For vim:
|
|
51
|
-
#*.swp
|
|
52
|
-
#
|
|
53
|
-
spec/rails_app/log/*
|
|
54
|
-
*.log
|
|
55
|
-
*.sqlite3
|
|
56
|
-
Gemfile*.lock
|
|
57
|
-
gemfiles/*.lock
|
|
58
|
-
.ruby-version
|
|
59
|
-
tags
|
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--color
|
data/.rubocop.yml
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
|
2
|
-
|
|
3
|
-
AllCops:
|
|
4
|
-
Exclude:
|
|
5
|
-
- 'lib/generators/sorcery/templates/**/*'
|
|
6
|
-
TargetRubyVersion: 2.6
|
|
7
|
-
|
|
8
|
-
# See: https://github.com/rubocop-hq/rubocop/issues/3344
|
|
9
|
-
Style/DoubleNegation:
|
|
10
|
-
Enabled: false
|
|
11
|
-
|
|
12
|
-
####################
|
|
13
|
-
## Pre-1.0.0 Code ##
|
|
14
|
-
####################
|
|
15
|
-
|
|
16
|
-
Metrics/AbcSize:
|
|
17
|
-
Exclude:
|
|
18
|
-
- 'lib/**/*'
|
|
19
|
-
- 'spec/**/*'
|
|
20
|
-
Metrics/BlockLength:
|
|
21
|
-
Exclude:
|
|
22
|
-
- 'lib/**/*'
|
|
23
|
-
- 'spec/**/*'
|
|
24
|
-
Layout/LineLength:
|
|
25
|
-
Exclude:
|
|
26
|
-
- 'lib/**/*'
|
|
27
|
-
- 'spec/**/*'
|
|
28
|
-
Metrics/ClassLength:
|
|
29
|
-
Exclude:
|
|
30
|
-
- 'lib/**/*'
|
|
31
|
-
- 'spec/**/*'
|
|
32
|
-
Metrics/CyclomaticComplexity:
|
|
33
|
-
Exclude:
|
|
34
|
-
- 'lib/**/*'
|
|
35
|
-
- 'spec/**/*'
|
|
36
|
-
Metrics/MethodLength:
|
|
37
|
-
Exclude:
|
|
38
|
-
- 'lib/**/*'
|
|
39
|
-
- 'spec/**/*'
|
|
40
|
-
Metrics/PerceivedComplexity:
|
|
41
|
-
Exclude:
|
|
42
|
-
- 'lib/**/*'
|
|
43
|
-
- 'spec/**/*'
|
|
44
|
-
Naming/AccessorMethodName:
|
|
45
|
-
Exclude:
|
|
46
|
-
- 'lib/**/*'
|
|
47
|
-
- 'spec/**/*'
|
|
48
|
-
Naming/PredicateName:
|
|
49
|
-
Exclude:
|
|
50
|
-
- 'lib/**/*'
|
|
51
|
-
- 'spec/**/*'
|
|
52
|
-
Style/Documentation:
|
|
53
|
-
Exclude:
|
|
54
|
-
- 'lib/**/*'
|
|
55
|
-
- 'spec/**/*'
|
data/.rubocop_todo.yml
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2021-04-04 05:00:11 UTC using RuboCop version 0.88.0.
|
|
4
|
-
# The point is for the user to remove these configuration records
|
|
5
|
-
# one by one as the offenses are removed from the code base.
|
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
-
|
|
9
|
-
# Offense count: 1
|
|
10
|
-
# Configuration parameters: Include.
|
|
11
|
-
# Include: **/*.gemspec
|
|
12
|
-
Gemspec/RequiredRubyVersion:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'sorcery.gemspec'
|
|
15
|
-
|
|
16
|
-
# Offense count: 2
|
|
17
|
-
# Cop supports --auto-correct.
|
|
18
|
-
# Configuration parameters: IndentationWidth.
|
|
19
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
20
|
-
Layout/FirstHashElementIndentation:
|
|
21
|
-
EnforcedStyle: consistent
|
|
22
|
-
|
|
23
|
-
# Offense count: 83
|
|
24
|
-
# Cop supports --auto-correct.
|
|
25
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
26
|
-
# SupportedHashRocketStyles: key, separator, table
|
|
27
|
-
# SupportedColonStyles: key, separator, table
|
|
28
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
29
|
-
Layout/HashAlignment:
|
|
30
|
-
Enabled: false
|
|
31
|
-
|
|
32
|
-
# Offense count: 3
|
|
33
|
-
# Cop supports --auto-correct.
|
|
34
|
-
# Configuration parameters: AllowInHeredoc.
|
|
35
|
-
Layout/TrailingWhitespace:
|
|
36
|
-
Exclude:
|
|
37
|
-
- 'lib/sorcery/controller/submodules/external.rb'
|
|
38
|
-
|
|
39
|
-
# Offense count: 2
|
|
40
|
-
# Configuration parameters: AllowSafeAssignment.
|
|
41
|
-
Lint/AssignmentInCondition:
|
|
42
|
-
Exclude:
|
|
43
|
-
- 'spec/rails_app/app/controllers/sorcery_controller.rb'
|
|
44
|
-
|
|
45
|
-
# Offense count: 1
|
|
46
|
-
# Cop supports --auto-correct.
|
|
47
|
-
Lint/NonDeterministicRequireOrder:
|
|
48
|
-
Exclude:
|
|
49
|
-
- 'spec/spec_helper.rb'
|
|
50
|
-
|
|
51
|
-
# Offense count: 4
|
|
52
|
-
# Cop supports --auto-correct.
|
|
53
|
-
Lint/RedundantCopDisableDirective:
|
|
54
|
-
Exclude:
|
|
55
|
-
- 'lib/sorcery/controller.rb'
|
|
56
|
-
- 'lib/sorcery/model.rb'
|
|
57
|
-
- 'spec/rails_app/config/application.rb'
|
|
58
|
-
- 'spec/shared_examples/user_shared_examples.rb'
|
|
59
|
-
|
|
60
|
-
# Offense count: 4
|
|
61
|
-
# Cop supports --auto-correct.
|
|
62
|
-
Lint/SendWithMixinArgument:
|
|
63
|
-
Exclude:
|
|
64
|
-
- 'lib/sorcery.rb'
|
|
65
|
-
- 'lib/sorcery/engine.rb'
|
|
66
|
-
- 'lib/sorcery/test_helpers/internal/rails.rb'
|
|
67
|
-
|
|
68
|
-
# Offense count: 2
|
|
69
|
-
# Cop supports --auto-correct.
|
|
70
|
-
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
71
|
-
Lint/UnusedBlockArgument:
|
|
72
|
-
Exclude:
|
|
73
|
-
- 'spec/shared_examples/user_shared_examples.rb'
|
|
74
|
-
|
|
75
|
-
# Offense count: 1
|
|
76
|
-
# Cop supports --auto-correct.
|
|
77
|
-
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
|
78
|
-
# SupportedStyles: assign_to_condition, assign_inside_condition
|
|
79
|
-
Style/ConditionalAssignment:
|
|
80
|
-
Exclude:
|
|
81
|
-
- 'lib/sorcery/adapters/active_record_adapter.rb'
|
|
82
|
-
|
|
83
|
-
# Offense count: 1
|
|
84
|
-
# Cop supports --auto-correct.
|
|
85
|
-
Style/ExpandPathArguments:
|
|
86
|
-
Exclude:
|
|
87
|
-
- 'spec/rails_app/config.ru'
|
|
88
|
-
|
|
89
|
-
# Offense count: 1
|
|
90
|
-
# Configuration parameters: EnforcedStyle.
|
|
91
|
-
# SupportedStyles: annotated, template, unannotated
|
|
92
|
-
Style/FormatStringToken:
|
|
93
|
-
Exclude:
|
|
94
|
-
- 'lib/generators/sorcery/install_generator.rb'
|
|
95
|
-
|
|
96
|
-
# Offense count: 125
|
|
97
|
-
# Cop supports --auto-correct.
|
|
98
|
-
# Configuration parameters: EnforcedStyle.
|
|
99
|
-
# SupportedStyles: always, always_true, never
|
|
100
|
-
Style/FrozenStringLiteralComment:
|
|
101
|
-
Enabled: false
|
|
102
|
-
|
|
103
|
-
# Offense count: 3
|
|
104
|
-
# Cop supports --auto-correct.
|
|
105
|
-
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
106
|
-
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
107
|
-
Style/HashSyntax:
|
|
108
|
-
Exclude:
|
|
109
|
-
- 'lib/sorcery/adapters/active_record_adapter.rb'
|
|
110
|
-
- 'lib/sorcery/test_helpers/rails/integration.rb'
|
|
111
|
-
|
|
112
|
-
# Offense count: 34
|
|
113
|
-
# Cop supports --auto-correct.
|
|
114
|
-
Style/IfUnlessModifier:
|
|
115
|
-
Enabled: false
|
|
116
|
-
|
|
117
|
-
# Offense count: 1
|
|
118
|
-
# Cop supports --auto-correct.
|
|
119
|
-
Style/MultilineIfModifier:
|
|
120
|
-
Exclude:
|
|
121
|
-
- 'lib/sorcery/providers/line.rb'
|
|
122
|
-
|
|
123
|
-
# Offense count: 2
|
|
124
|
-
# Cop supports --auto-correct.
|
|
125
|
-
Style/RedundantBegin:
|
|
126
|
-
Exclude:
|
|
127
|
-
- 'lib/sorcery/controller.rb'
|
|
128
|
-
- 'lib/sorcery/model.rb'
|
|
129
|
-
|
|
130
|
-
# Offense count: 4
|
|
131
|
-
# Cop supports --auto-correct.
|
|
132
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
|
133
|
-
# AllowedMethods: present?, blank?, presence, try, try!
|
|
134
|
-
Style/SafeNavigation:
|
|
135
|
-
Exclude:
|
|
136
|
-
- 'lib/sorcery/controller/config.rb'
|
|
137
|
-
- 'lib/sorcery/controller/submodules/brute_force_protection.rb'
|
|
138
|
-
- 'lib/sorcery/controller/submodules/remember_me.rb'
|
|
139
|
-
- 'lib/sorcery/model.rb'
|
|
140
|
-
|
|
141
|
-
# Offense count: 7
|
|
142
|
-
# Cop supports --auto-correct.
|
|
143
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
144
|
-
# SupportedStyles: single_quotes, double_quotes
|
|
145
|
-
Style/StringLiterals:
|
|
146
|
-
Exclude:
|
|
147
|
-
- 'spec/controllers/controller_oauth2_spec.rb'
|
|
148
|
-
- 'spec/sorcery_crypto_providers_spec.rb'
|
|
149
|
-
|
|
150
|
-
# Offense count: 1
|
|
151
|
-
# Cop supports --auto-correct.
|
|
152
|
-
# Configuration parameters: EnforcedStyle, MinSize.
|
|
153
|
-
# SupportedStyles: percent, brackets
|
|
154
|
-
Style/SymbolArray:
|
|
155
|
-
Exclude:
|
|
156
|
-
- 'Rakefile'
|
|
157
|
-
|
|
158
|
-
# Offense count: 2
|
|
159
|
-
# Cop supports --auto-correct.
|
|
160
|
-
Style/UnpackFirst:
|
|
161
|
-
Exclude:
|
|
162
|
-
- 'lib/sorcery/crypto_providers/aes256.rb'
|
|
163
|
-
- 'spec/sorcery_crypto_providers_spec.rb'
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# The Sorcery Community Code of Conduct
|
|
2
|
-
|
|
3
|
-
This document provides a few simple community guidelines for a safe, respectful,
|
|
4
|
-
productive, and collaborative place for any person who is willing to contribute
|
|
5
|
-
to the Sorcery community. It applies to all "collaborative spaces", which are
|
|
6
|
-
defined as community communications channels (such as mailing lists, submitted
|
|
7
|
-
patches, commit comments, etc.).
|
|
8
|
-
|
|
9
|
-
* Participants will be tolerant of opposing views.
|
|
10
|
-
* Participants must ensure that their language and actions are free of personal
|
|
11
|
-
attacks and disparaging personal remarks.
|
|
12
|
-
* When interpreting the words and actions of others, participants should always
|
|
13
|
-
assume good intentions.
|
|
14
|
-
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
data/Gemfile
DELETED