devise-otp 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +1 -1
- data/Rakefile +17 -18
- data/app/assets/javascripts/devise-otp.js +0 -0
- data/app/assets/javascripts/qrcode.js +0 -0
- data/app/controllers/devise_otp/devise/{credentials_controller.rb → otp_credentials_controller.rb} +17 -21
- data/app/controllers/devise_otp/devise/{tokens_controller.rb → otp_tokens_controller.rb} +9 -13
- data/app/views/devise/{credentials → otp_credentials}/refresh.html.erb +0 -0
- data/app/views/devise/{credentials → otp_credentials}/show.html.erb +1 -1
- data/app/views/devise/{tokens → otp_tokens}/_token_secret.html.erb +4 -4
- data/app/views/devise/{tokens → otp_tokens}/_trusted_devices.html.erb +0 -0
- data/app/views/devise/{tokens → otp_tokens}/recovery.html.erb +4 -4
- data/app/views/devise/{tokens → otp_tokens}/recovery_codes.text.erb +0 -0
- data/app/views/devise/{tokens → otp_tokens}/show.html.erb +5 -5
- data/config/locales/en.yml +4 -12
- data/devise-otp.gemspec +13 -13
- data/lib/devise-otp/version.rb +2 -2
- data/lib/devise-otp.rb +15 -29
- data/lib/devise_otp_authenticatable/controllers/helpers.rb +21 -23
- data/lib/devise_otp_authenticatable/controllers/url_helpers.rb +0 -2
- data/lib/devise_otp_authenticatable/engine.rb +6 -4
- data/lib/devise_otp_authenticatable/hooks/sessions.rb +4 -5
- data/lib/devise_otp_authenticatable/hooks.rb +1 -3
- data/lib/devise_otp_authenticatable/models/otp_authenticatable.rb +19 -25
- data/lib/devise_otp_authenticatable/routes.rb +11 -14
- data/lib/generators/active_record/devise_otp_generator.rb +1 -1
- data/lib/generators/active_record/templates/migration.rb +0 -0
- data/lib/generators/devise_otp/devise_otp_generator.rb +12 -13
- data/lib/generators/devise_otp/install_generator.rb +3 -4
- data/lib/generators/devise_otp/views_generator.rb +5 -5
- data/test/dummy/README.rdoc +0 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/config/manifest.js +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/controllers/posts_controller.rb +2 -2
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/helpers/posts_helper.rb +0 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/post.rb +0 -0
- data/test/dummy/app/models/user.rb +8 -8
- data/test/dummy/app/views/layouts/application.html.erb +0 -0
- data/test/dummy/app/views/posts/_form.html.erb +0 -0
- data/test/dummy/app/views/posts/edit.html.erb +0 -0
- data/test/dummy/app/views/posts/index.html.erb +0 -0
- data/test/dummy/app/views/posts/new.html.erb +0 -0
- data/test/dummy/app/views/posts/show.html.erb +0 -0
- data/test/dummy/config/application.rb +4 -4
- data/test/dummy/config/boot.rb +5 -5
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/devise.rb +6 -8
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/secret_token.rb +2 -2
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/dummy/config/initializers/wrap_parameters.rb +1 -1
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/config.ru +1 -1
- data/test/dummy/db/migrate/20130125101430_create_users.rb +0 -0
- data/test/dummy/db/migrate/20130131092406_add_devise_to_users.rb +12 -13
- data/test/dummy/db/migrate/20130131142320_create_posts.rb +0 -0
- data/test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb +13 -13
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +3 -3
- data/test/integration/persistence_test.rb +11 -12
- data/test/integration/refresh_test.rb +13 -14
- data/test/integration/sign_in_test.rb +24 -26
- data/test/integration/token_test.rb +5 -6
- data/test/integration_tests_helper.rb +16 -17
- data/test/model_tests_helper.rb +5 -7
- data/test/models/otp_authenticatable_test.rb +18 -19
- data/test/orm/active_record.rb +0 -0
- data/test/test_helper.rb +10 -10
- metadata +32 -73
- data/test/dummy/db/test.sqlite3-journal +0 -0
data/test/test_helper.rb
CHANGED
@@ -4,21 +4,21 @@ DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
|
4
4
|
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
5
5
|
require "dummy/config/environment"
|
6
6
|
require "orm/#{DEVISE_ORM}"
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
7
|
+
require "rails/test_help"
|
8
|
+
require "capybara/rails"
|
9
|
+
require "capybara/cuprite"
|
10
|
+
require "minitest/reporters"
|
11
11
|
|
12
12
|
MiniTest::Reporters.use!
|
13
13
|
|
14
|
-
#I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__) if DEVISE_ORM == :mongoid
|
14
|
+
# I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__) if DEVISE_ORM == :mongoid
|
15
15
|
|
16
|
-
#ActiveSupport::Deprecation.silenced = true
|
16
|
+
# ActiveSupport::Deprecation.silenced = true
|
17
17
|
|
18
18
|
# Use a module to not pollute the global namespace
|
19
19
|
module CapybaraHelper
|
20
20
|
def self.register_driver(driver_name, args = [])
|
21
|
-
opts = {
|
21
|
+
opts = {headless: true, js_errors: true, window_size: [1920, 1200], browser_options: {}}
|
22
22
|
args.each do |arg|
|
23
23
|
opts[:browser_options][arg] = nil
|
24
24
|
end
|
@@ -33,12 +33,12 @@ end
|
|
33
33
|
CapybaraHelper.register_driver(:headless_chrome, %w[disable-gpu no-sandbox disable-dev-shm-usage])
|
34
34
|
|
35
35
|
# Configure Capybara JS driver
|
36
|
-
Capybara.current_driver
|
36
|
+
Capybara.current_driver = :headless_chrome
|
37
37
|
Capybara.javascript_driver = :headless_chrome
|
38
38
|
|
39
39
|
# Configure Capybara server
|
40
40
|
Capybara.run_server = true
|
41
|
-
Capybara.server
|
41
|
+
Capybara.server = :puma, {Silent: true}
|
42
42
|
|
43
43
|
class ActionDispatch::IntegrationTest
|
44
44
|
include Capybara::DSL
|
@@ -53,7 +53,7 @@ class ActionDispatch::IntegrationTest
|
|
53
53
|
# See: https://github.com/rubycdp/ferrum/blob/master/lib/ferrum/page.rb
|
54
54
|
def enable_chrome_headless_downloads(session, directory)
|
55
55
|
page = session.driver.browser.page
|
56
|
-
page.command(
|
56
|
+
page.command("Page.setDownloadBehavior", behavior: "allow", downloadPath: directory)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-otp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lele Forzani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '7.0'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '7.
|
23
|
+
version: '7.2'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: '7.0'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '7.
|
33
|
+
version: '7.2'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: devise
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: 4.8.0
|
41
41
|
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: '5.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
version: 4.8.0
|
51
51
|
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: '5.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rotp
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -177,6 +177,20 @@ dependencies:
|
|
177
177
|
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: standardrb
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
180
194
|
description: Time Based OTP/rfc6238 compatible authentication for Devise
|
181
195
|
email:
|
182
196
|
- lele@windmill.it
|
@@ -187,21 +201,22 @@ extra_rdoc_files: []
|
|
187
201
|
files:
|
188
202
|
- ".github/workflows/ci.yml"
|
189
203
|
- ".gitignore"
|
204
|
+
- CHANGELOG.md
|
190
205
|
- Gemfile
|
191
206
|
- LICENSE.txt
|
192
207
|
- README.md
|
193
208
|
- Rakefile
|
194
209
|
- app/assets/javascripts/devise-otp.js
|
195
210
|
- app/assets/javascripts/qrcode.js
|
196
|
-
- app/controllers/devise_otp/devise/
|
197
|
-
- app/controllers/devise_otp/devise/
|
198
|
-
- app/views/devise/
|
199
|
-
- app/views/devise/
|
200
|
-
- app/views/devise/
|
201
|
-
- app/views/devise/
|
202
|
-
- app/views/devise/
|
203
|
-
- app/views/devise/
|
204
|
-
- app/views/devise/
|
211
|
+
- app/controllers/devise_otp/devise/otp_credentials_controller.rb
|
212
|
+
- app/controllers/devise_otp/devise/otp_tokens_controller.rb
|
213
|
+
- app/views/devise/otp_credentials/refresh.html.erb
|
214
|
+
- app/views/devise/otp_credentials/show.html.erb
|
215
|
+
- app/views/devise/otp_tokens/_token_secret.html.erb
|
216
|
+
- app/views/devise/otp_tokens/_trusted_devices.html.erb
|
217
|
+
- app/views/devise/otp_tokens/recovery.html.erb
|
218
|
+
- app/views/devise/otp_tokens/recovery_codes.text.erb
|
219
|
+
- app/views/devise/otp_tokens/show.html.erb
|
205
220
|
- config/locales/en.yml
|
206
221
|
- devise-otp.gemspec
|
207
222
|
- docs/QR_CODES.md
|
@@ -258,7 +273,6 @@ files:
|
|
258
273
|
- test/dummy/db/migrate/20130131092406_add_devise_to_users.rb
|
259
274
|
- test/dummy/db/migrate/20130131142320_create_posts.rb
|
260
275
|
- test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb
|
261
|
-
- test/dummy/db/test.sqlite3-journal
|
262
276
|
- test/dummy/lib/assets/.gitkeep
|
263
277
|
- test/dummy/public/404.html
|
264
278
|
- test/dummy/public/422.html
|
@@ -292,63 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
306
|
- !ruby/object:Gem::Version
|
293
307
|
version: '0'
|
294
308
|
requirements: []
|
295
|
-
rubygems_version: 3.
|
309
|
+
rubygems_version: 3.3.7
|
296
310
|
signing_key:
|
297
311
|
specification_version: 4
|
298
312
|
summary: Time Based OTP/rfc6238 compatible authentication for Devise
|
299
|
-
test_files:
|
300
|
-
- test/dummy/README.rdoc
|
301
|
-
- test/dummy/Rakefile
|
302
|
-
- test/dummy/app/assets/config/manifest.js
|
303
|
-
- test/dummy/app/assets/javascripts/application.js
|
304
|
-
- test/dummy/app/assets/stylesheets/application.css
|
305
|
-
- test/dummy/app/controllers/application_controller.rb
|
306
|
-
- test/dummy/app/controllers/posts_controller.rb
|
307
|
-
- test/dummy/app/helpers/application_helper.rb
|
308
|
-
- test/dummy/app/helpers/posts_helper.rb
|
309
|
-
- test/dummy/app/mailers/.gitkeep
|
310
|
-
- test/dummy/app/models/post.rb
|
311
|
-
- test/dummy/app/models/user.rb
|
312
|
-
- test/dummy/app/views/layouts/application.html.erb
|
313
|
-
- test/dummy/app/views/posts/_form.html.erb
|
314
|
-
- test/dummy/app/views/posts/edit.html.erb
|
315
|
-
- test/dummy/app/views/posts/index.html.erb
|
316
|
-
- test/dummy/app/views/posts/new.html.erb
|
317
|
-
- test/dummy/app/views/posts/show.html.erb
|
318
|
-
- test/dummy/config.ru
|
319
|
-
- test/dummy/config/application.rb
|
320
|
-
- test/dummy/config/boot.rb
|
321
|
-
- test/dummy/config/database.yml
|
322
|
-
- test/dummy/config/environment.rb
|
323
|
-
- test/dummy/config/environments/development.rb
|
324
|
-
- test/dummy/config/environments/production.rb
|
325
|
-
- test/dummy/config/environments/test.rb
|
326
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
327
|
-
- test/dummy/config/initializers/devise.rb
|
328
|
-
- test/dummy/config/initializers/inflections.rb
|
329
|
-
- test/dummy/config/initializers/mime_types.rb
|
330
|
-
- test/dummy/config/initializers/secret_token.rb
|
331
|
-
- test/dummy/config/initializers/session_store.rb
|
332
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
333
|
-
- test/dummy/config/locales/en.yml
|
334
|
-
- test/dummy/config/routes.rb
|
335
|
-
- test/dummy/db/migrate/20130125101430_create_users.rb
|
336
|
-
- test/dummy/db/migrate/20130131092406_add_devise_to_users.rb
|
337
|
-
- test/dummy/db/migrate/20130131142320_create_posts.rb
|
338
|
-
- test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb
|
339
|
-
- test/dummy/db/test.sqlite3-journal
|
340
|
-
- test/dummy/lib/assets/.gitkeep
|
341
|
-
- test/dummy/public/404.html
|
342
|
-
- test/dummy/public/422.html
|
343
|
-
- test/dummy/public/500.html
|
344
|
-
- test/dummy/public/favicon.ico
|
345
|
-
- test/dummy/script/rails
|
346
|
-
- test/integration/persistence_test.rb
|
347
|
-
- test/integration/refresh_test.rb
|
348
|
-
- test/integration/sign_in_test.rb
|
349
|
-
- test/integration/token_test.rb
|
350
|
-
- test/integration_tests_helper.rb
|
351
|
-
- test/model_tests_helper.rb
|
352
|
-
- test/models/otp_authenticatable_test.rb
|
353
|
-
- test/orm/active_record.rb
|
354
|
-
- test/test_helper.rb
|
313
|
+
test_files: []
|
Binary file
|