devise-otp 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/CHANGELOG.md +17 -0
  4. data/Gemfile +0 -0
  5. data/LICENSE.txt +0 -0
  6. data/README.md +1 -1
  7. data/Rakefile +0 -0
  8. data/app/assets/javascripts/devise-otp.js +0 -0
  9. data/app/assets/javascripts/qrcode.js +0 -0
  10. data/app/controllers/devise_otp/devise/{credentials_controller.rb → otp_credentials_controller.rb} +2 -2
  11. data/app/controllers/devise_otp/devise/{tokens_controller.rb → otp_tokens_controller.rb} +2 -2
  12. data/app/views/devise/{credentials → otp_credentials}/refresh.html.erb +0 -0
  13. data/app/views/devise/{credentials → otp_credentials}/show.html.erb +0 -0
  14. data/app/views/devise/{tokens → otp_tokens}/_token_secret.html.erb +0 -0
  15. data/app/views/devise/{tokens → otp_tokens}/_trusted_devices.html.erb +0 -0
  16. data/app/views/devise/{tokens → otp_tokens}/recovery.html.erb +0 -0
  17. data/app/views/devise/{tokens → otp_tokens}/recovery_codes.text.erb +0 -0
  18. data/app/views/devise/{tokens → otp_tokens}/show.html.erb +0 -0
  19. data/config/locales/en.yml +0 -0
  20. data/devise-otp.gemspec +1 -1
  21. data/lib/devise-otp/version.rb +2 -2
  22. data/lib/devise-otp.rb +0 -0
  23. data/lib/devise_otp_authenticatable/controllers/helpers.rb +0 -0
  24. data/lib/devise_otp_authenticatable/controllers/url_helpers.rb +0 -0
  25. data/lib/devise_otp_authenticatable/engine.rb +0 -0
  26. data/lib/devise_otp_authenticatable/hooks/sessions.rb +0 -0
  27. data/lib/devise_otp_authenticatable/hooks.rb +0 -0
  28. data/lib/devise_otp_authenticatable/models/otp_authenticatable.rb +0 -0
  29. data/lib/devise_otp_authenticatable/routes.rb +2 -2
  30. data/lib/generators/active_record/devise_otp_generator.rb +0 -0
  31. data/lib/generators/active_record/templates/migration.rb +0 -0
  32. data/lib/generators/devise_otp/devise_otp_generator.rb +0 -0
  33. data/lib/generators/devise_otp/install_generator.rb +0 -0
  34. data/lib/generators/devise_otp/views_generator.rb +0 -0
  35. data/test/dummy/README.rdoc +0 -0
  36. data/test/dummy/Rakefile +0 -0
  37. data/test/dummy/app/assets/config/manifest.js +0 -0
  38. data/test/dummy/app/assets/javascripts/application.js +0 -0
  39. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  40. data/test/dummy/app/controllers/application_controller.rb +0 -0
  41. data/test/dummy/app/controllers/posts_controller.rb +0 -0
  42. data/test/dummy/app/helpers/application_helper.rb +0 -0
  43. data/test/dummy/app/helpers/posts_helper.rb +0 -0
  44. data/test/dummy/app/mailers/.gitkeep +0 -0
  45. data/test/dummy/app/models/post.rb +0 -0
  46. data/test/dummy/app/models/user.rb +0 -0
  47. data/test/dummy/app/views/layouts/application.html.erb +0 -0
  48. data/test/dummy/app/views/posts/_form.html.erb +0 -0
  49. data/test/dummy/app/views/posts/edit.html.erb +0 -0
  50. data/test/dummy/app/views/posts/index.html.erb +0 -0
  51. data/test/dummy/app/views/posts/new.html.erb +0 -0
  52. data/test/dummy/app/views/posts/show.html.erb +0 -0
  53. data/test/dummy/config/application.rb +0 -0
  54. data/test/dummy/config/boot.rb +0 -0
  55. data/test/dummy/config/database.yml +0 -0
  56. data/test/dummy/config/environment.rb +0 -0
  57. data/test/dummy/config/environments/development.rb +0 -0
  58. data/test/dummy/config/environments/production.rb +0 -0
  59. data/test/dummy/config/environments/test.rb +0 -0
  60. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  61. data/test/dummy/config/initializers/devise.rb +0 -0
  62. data/test/dummy/config/initializers/inflections.rb +0 -0
  63. data/test/dummy/config/initializers/mime_types.rb +0 -0
  64. data/test/dummy/config/initializers/secret_token.rb +0 -0
  65. data/test/dummy/config/initializers/session_store.rb +0 -0
  66. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  67. data/test/dummy/config/locales/en.yml +0 -0
  68. data/test/dummy/config/routes.rb +0 -0
  69. data/test/dummy/config.ru +0 -0
  70. data/test/dummy/db/migrate/20130125101430_create_users.rb +0 -0
  71. data/test/dummy/db/migrate/20130131092406_add_devise_to_users.rb +0 -0
  72. data/test/dummy/db/migrate/20130131142320_create_posts.rb +0 -0
  73. data/test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb +0 -0
  74. data/test/dummy/lib/assets/.gitkeep +0 -0
  75. data/test/dummy/public/404.html +0 -0
  76. data/test/dummy/public/422.html +0 -0
  77. data/test/dummy/public/500.html +0 -0
  78. data/test/dummy/public/favicon.ico +0 -0
  79. data/test/dummy/script/rails +0 -0
  80. data/test/integration/persistence_test.rb +0 -0
  81. data/test/integration/refresh_test.rb +0 -0
  82. data/test/integration/sign_in_test.rb +0 -0
  83. data/test/integration/token_test.rb +0 -0
  84. data/test/integration_tests_helper.rb +0 -0
  85. data/test/model_tests_helper.rb +0 -0
  86. data/test/models/otp_authenticatable_test.rb +0 -0
  87. data/test/orm/active_record.rb +0 -0
  88. data/test/test_helper.rb +0 -0
  89. metadata +12 -13
  90. data/test/dummy/db/test.sqlite3-journal +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b5132454cb31efb85ab78d8a0866c6e98e3e3fc8f9c51fa770b735e59a0d976
4
- data.tar.gz: ef69e79487527616462f0c3c918094a9338ede9b59a8aef005b34549ae231166
3
+ metadata.gz: 6fda2423bde851bf5adc44a3d702c2c61ddabf128f2e39cd3bca9098efc582f0
4
+ data.tar.gz: 4086a98d52455eaad597ad2afed8dd3bdbae1e07415865a64409cd58c27304e8
5
5
  SHA512:
6
- metadata.gz: 7312e301fb3a313056878b4e7d067ed78ad37717fbb632b27e9dce05d7bd77e8b972bdbcb8ff189800509ef65d74c99773c650cebc881756d5c9a5456b0c2578
7
- data.tar.gz: 7e1f0bb51e8c805f6e95eb4cc61231e3bcfd9562ac0c523ee3f60221cea9b56891f42badb66ed7b3bc986fec63cd9164100b72822d26ede99fda7a7029f29f38
6
+ metadata.gz: aced8c7eba137c8f2851f665c45277044e2b5c7f46fdfec080b506a72f87643ae91b950876c25608d884c63cb6add1fe49df1e19d635656f8e350e13627542f9
7
+ data.tar.gz: 7796a7911e786070f7c3bf1f061443448034308ef6203bad52907e9b5faf413f901d446440c2ac632612420fa1fde5d6431f5bc0db5050e1b25938ea1ff5e944
data/.gitignore CHANGED
File without changes
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0
4
+
5
+ Breaking changes:
6
+
7
+ - rename `Devise::Otp` to `Devise::OTP`
8
+ - change `credentials` directory to `otp_credentials`
9
+ - change `tokens` directory to `otp_tokens`
10
+
11
+ Other improvements:
12
+
13
+ - Fix file permissions
14
+
15
+ ## 0.3.0
16
+
17
+ A long awaited update bringing Devise::OTP from the dead!
data/Gemfile CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Devise::Otp
1
+ # Devise::OTP
2
2
 
3
3
  Devise OTP is a two-factors authentication extension for Devise. The second factor is done using an [RFC 6238](https://datatracker.ietf.org/doc/html/rfc6238) Time-Based One-Time Password (TOTP) implemented by the [rotp library](https://github.com/mdp/rotp).
4
4
 
data/Rakefile CHANGED
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  module DeviseOtp
2
2
  module Devise
3
- class CredentialsController < DeviseController
3
+ class OtpCredentialsController < DeviseController
4
4
  helper_method :new_session_path
5
5
 
6
6
  prepend_before_action :authenticate_scope!, :only => [:get_refresh, :set_refresh]
@@ -94,7 +94,7 @@ module DeviseOtp
94
94
  end
95
95
 
96
96
  def self.controller_path
97
- "#{::Devise.otp_controller_path}/credentials"
97
+ "#{::Devise.otp_controller_path}/otp_credentials"
98
98
  end
99
99
 
100
100
  end
@@ -1,6 +1,6 @@
1
1
  module DeviseOtp
2
2
  module Devise
3
- class TokensController < DeviseController
3
+ class OtpTokensController < DeviseController
4
4
  include ::Devise::Controllers::Helpers
5
5
 
6
6
  prepend_before_action :ensure_credentials_refresh
@@ -104,7 +104,7 @@ module DeviseOtp
104
104
  end
105
105
 
106
106
  def self.controller_path
107
- "#{::Devise.otp_controller_path}/tokens"
107
+ "#{::Devise.otp_controller_path}/otp_tokens"
108
108
  end
109
109
 
110
110
  end
File without changes
data/devise-otp.gemspec CHANGED
@@ -4,7 +4,7 @@ require_relative 'lib/devise-otp/version'
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "devise-otp"
7
- gem.version = Devise::Otp::VERSION
7
+ gem.version = Devise::OTP::VERSION
8
8
  gem.authors = ["Lele Forzani", "Josef Strzibny"]
9
9
  gem.email = ["lele@windmill.it", "strzibny@strzibny.name"]
10
10
  gem.description = %q{Time Based OTP/rfc6238 compatible authentication for Devise}
@@ -1,5 +1,5 @@
1
1
  module Devise
2
- module Otp
3
- VERSION = "0.3.0"
2
+ module OTP
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
data/lib/devise-otp.rb CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -6,7 +6,7 @@ module ActionDispatch::Routing
6
6
  def devise_otp(mapping, controllers)
7
7
  namespace :otp, :module => :devise_otp do
8
8
  resource :token, :only => [:show, :update, :destroy],
9
- :path => mapping.path_names[:token], :controller => controllers[:tokens] do
9
+ :path => mapping.path_names[:token], :controller => controllers[:otp_tokens] do
10
10
 
11
11
  if Devise.otp_trust_persistence
12
12
  get :persistence, :action => 'get_persistence'
@@ -18,7 +18,7 @@ module ActionDispatch::Routing
18
18
  end
19
19
 
20
20
  resource :credential, :only => [:show, :update],
21
- :path => mapping.path_names[:credentials], :controller => controllers[:credentials] do
21
+ :path => mapping.path_names[:credentials], :controller => controllers[:otp_credentials] do
22
22
 
23
23
  get :refresh, :action => 'get_refresh'
24
24
  put :refresh, :action => 'set_refresh'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/dummy/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/dummy/config.ru CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/test_helper.rb CHANGED
File without changes
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.3.0
4
+ version: 0.4.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: 2022-03-19 00:00:00.000000000 Z
12
+ date: 2022-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -187,21 +187,22 @@ extra_rdoc_files: []
187
187
  files:
188
188
  - ".github/workflows/ci.yml"
189
189
  - ".gitignore"
190
+ - CHANGELOG.md
190
191
  - Gemfile
191
192
  - LICENSE.txt
192
193
  - README.md
193
194
  - Rakefile
194
195
  - app/assets/javascripts/devise-otp.js
195
196
  - app/assets/javascripts/qrcode.js
196
- - app/controllers/devise_otp/devise/credentials_controller.rb
197
- - app/controllers/devise_otp/devise/tokens_controller.rb
198
- - app/views/devise/credentials/refresh.html.erb
199
- - app/views/devise/credentials/show.html.erb
200
- - app/views/devise/tokens/_token_secret.html.erb
201
- - app/views/devise/tokens/_trusted_devices.html.erb
202
- - app/views/devise/tokens/recovery.html.erb
203
- - app/views/devise/tokens/recovery_codes.text.erb
204
- - app/views/devise/tokens/show.html.erb
197
+ - app/controllers/devise_otp/devise/otp_credentials_controller.rb
198
+ - app/controllers/devise_otp/devise/otp_tokens_controller.rb
199
+ - app/views/devise/otp_credentials/refresh.html.erb
200
+ - app/views/devise/otp_credentials/show.html.erb
201
+ - app/views/devise/otp_tokens/_token_secret.html.erb
202
+ - app/views/devise/otp_tokens/_trusted_devices.html.erb
203
+ - app/views/devise/otp_tokens/recovery.html.erb
204
+ - app/views/devise/otp_tokens/recovery_codes.text.erb
205
+ - app/views/devise/otp_tokens/show.html.erb
205
206
  - config/locales/en.yml
206
207
  - devise-otp.gemspec
207
208
  - docs/QR_CODES.md
@@ -258,7 +259,6 @@ files:
258
259
  - test/dummy/db/migrate/20130131092406_add_devise_to_users.rb
259
260
  - test/dummy/db/migrate/20130131142320_create_posts.rb
260
261
  - test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb
261
- - test/dummy/db/test.sqlite3-journal
262
262
  - test/dummy/lib/assets/.gitkeep
263
263
  - test/dummy/public/404.html
264
264
  - test/dummy/public/422.html
@@ -336,7 +336,6 @@ test_files:
336
336
  - test/dummy/db/migrate/20130131092406_add_devise_to_users.rb
337
337
  - test/dummy/db/migrate/20130131142320_create_posts.rb
338
338
  - test/dummy/db/migrate/20130131160351_devise_otp_add_to_users.rb
339
- - test/dummy/db/test.sqlite3-journal
340
339
  - test/dummy/lib/assets/.gitkeep
341
340
  - test/dummy/public/404.html
342
341
  - test/dummy/public/422.html
Binary file