devise_userbin 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e7891185009c513f974cba6f1aa79226bdb1cd8
4
- data.tar.gz: 416d1088047d4101aa81ecb43ec45706be635f6c
3
+ metadata.gz: aed4286abbffee0cfd7d4ca3777ac65f34d0425e
4
+ data.tar.gz: 0d4847b20c06c6a08cb3e0b6aa5806def5de80c0
5
5
  SHA512:
6
- metadata.gz: 7254079fc997abf92336e4bd282235c1345c161a5da7c232f30afa4675d5d8d5c15238b5ba539ad20970b494f518131682414350f3c3765d5fd758ee72c0f506
7
- data.tar.gz: 6e7e673284ee6b43412868687af020dead62fd5d1e9917a18e17669dadb85e1acf21bf02de7f02128487f629643a80cfef462134a5244475ba1a5509b6dacb33
6
+ metadata.gz: 8e6570a7b3bc6625536051544c9b74b449901928b9f7277ff8296a85d84a7a7efb0e64780caba35de8469392faa42d429f1bd6abfd15241f714d722798d8d4c7
7
+ data.tar.gz: d46d32140092bd00a8e51260fdb9b3114d7b17def0ffa2b1a1104ca465a096c6d3e93f63a1ea561aab7b2489c29a8d77d774b1e5202c08bc2ac32d763471cef8
@@ -17,6 +17,8 @@ class Devise::DeviseUserbinController < DeviseController
17
17
 
18
18
  # Prevent "undefined method `errors' for nil:NilClass"
19
19
  self.resource = resource_class.new
20
+
21
+ render action: "#{@challenge.delivery_method}/edit"
20
22
  end
21
23
 
22
24
  def update
@@ -0,0 +1,13 @@
1
+ <h2><%= t "devise.two_factor_authentication.header" %></h2>
2
+
3
+ <p><%= t "devise.two_factor_authentication.edit.authenticator.instructions" %></p>
4
+
5
+ <%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
6
+ <%= devise_error_messages! %>
7
+ <p><%= label_tag :code, t("devise.two_factor_authentication.edit.common.code_label") %><br />
8
+ <%= text_field_tag :code %>
9
+ <%= hidden_field_tag(:challenge_id, @challenge.id) %>
10
+ <p><%= submit_tag t("devise.two_factor_authentication.edit.common.submit_button") %></p>
11
+ <% end -%>
12
+
13
+ <p><%= t "devise.two_factor_authentication.edit.common.recovery_message" %>
@@ -0,0 +1,16 @@
1
+ <h2><%= t "devise.two_factor_authentication.header" %></h2>
2
+
3
+ <p>
4
+ <%= t "devise.two_factor_authentication.edit.sms.instructions" %>
5
+ <%= link_to t("devise.two_factor_authentication.edit.sms.resend"), send("new_#{resource_name}_two_factor_authentication_path") %>.
6
+ </p>
7
+
8
+ <%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
9
+ <%= devise_error_messages! %>
10
+ <p><%= label_tag :code, t("devise.two_factor_authentication.edit.common.code_label") %><br />
11
+ <%= text_field_tag :code %>
12
+ <%= hidden_field_tag(:challenge_id, @challenge.id) %>
13
+ <p><%= submit_tag t("devise.two_factor_authentication.edit.common.submit_button") %></p>
14
+ <% end -%>
15
+
16
+ <p><%= t "devise.two_factor_authentication.edit.common.recovery_message" %>
@@ -0,0 +1,13 @@
1
+ <h2><%= t "devise.two_factor_authentication.header" %></h2>
2
+
3
+ <p><%= t "devise.two_factor_authentication.edit.yubikey.instructions" %></p>
4
+
5
+ <%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
6
+ <%= devise_error_messages! %>
7
+ <p><%= label_tag :code, t("devise.two_factor_authentication.edit.common.code_label") %><br />
8
+ <%= text_field_tag :code %>
9
+ <%= hidden_field_tag(:challenge_id, @challenge.id) %>
10
+ <p><%= submit_tag t("devise.two_factor_authentication.edit.common.submit_button") %></p>
11
+ <% end -%>
12
+
13
+ <p><%= t "devise.two_factor_authentication.edit.common.recovery_message" %>
@@ -15,9 +15,6 @@ module DeviseUserbin
15
15
  module Controllers
16
16
  autoload :Helpers, 'devise_userbin/controllers/helpers'
17
17
  end
18
- module Views
19
- autoload :Helpers, 'devise_userbin/controllers/view_helpers'
20
- end
21
18
  end
22
19
 
23
20
  if defined?(Rails::Railtie)
@@ -3,8 +3,5 @@ module DeviseUserbin
3
3
  ActiveSupport.on_load(:action_controller) do
4
4
  include DeviseUserbin::Controllers::Helpers
5
5
  end
6
- ActiveSupport.on_load(:action_view) do
7
- include DeviseUserbin::Views::Helpers
8
- end
9
6
  end
10
7
  end
@@ -4,8 +4,6 @@ module ActionDispatch::Routing
4
4
 
5
5
  def devise_userbin(mapping, controllers)
6
6
  resources :two_factor_authentication, :only => [:new, :show, :update, :edit], :path => mapping.path_names[:two_factor_authentication], :controller => controllers[:two_factor_authentication]
7
-
8
- resource :security_settings, :only => [:show], :path => mapping.path_names[:security_settings], :controller => controllers[:security_settings]
9
7
  end
10
8
  end
11
9
  end
@@ -1,3 +1,3 @@
1
1
  module DeviseUserbin
2
- VERSION = "0.5.1".freeze
2
+ VERSION = "0.5.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_userbin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Brissmyr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-10 00:00:00.000000000 Z
11
+ date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -88,12 +88,12 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - app/controllers/devise/devise_userbin_controller.rb
91
- - app/controllers/devise/security_settings_controller.rb
92
91
  - app/controllers/devise/two_factor_authentication_controller.rb
93
- - app/views/devise/two_factor_authentication/edit.html.erb
92
+ - app/views/devise/two_factor_authentication/authenticator/edit.html.erb
93
+ - app/views/devise/two_factor_authentication/sms/edit.html.erb
94
+ - app/views/devise/two_factor_authentication/yubikey/edit.html.erb
94
95
  - lib/devise_userbin.rb
95
96
  - lib/devise_userbin/controllers/helpers.rb
96
- - lib/devise_userbin/controllers/view_helpers.rb
97
97
  - lib/devise_userbin/hooks.rb
98
98
  - lib/devise_userbin/import.rb
99
99
  - lib/devise_userbin/model.rb
@@ -1,7 +0,0 @@
1
- class Devise::SecuritySettingsController < DeviseController
2
- include Devise::Controllers::Helpers
3
-
4
- def show
5
- redirect_to env['userbin'].security_settings_url
6
- end
7
- end
@@ -1,13 +0,0 @@
1
- <h2><%= t "devise.two_factor_authentication.show.header" %></h2>
2
-
3
- <p><%= t "devise.two_factor_authentication.show.instructions" %></p>
4
-
5
- <%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
6
- <%= devise_error_messages! %>
7
- <p><%= label_tag :code, t("devise.two_factor_authentication.show.code_label") %><br />
8
- <%= text_field_tag :code %>
9
- <%= hidden_field_tag(:challenge_id, @challenge.id) %>
10
- <p><%= submit_tag t("devise.two_factor_authentication.show.submit_button") %></p>
11
- <% end -%>
12
-
13
- <p><%= t "devise.two_factor_authentication.show.recovery_message" %>
@@ -1,13 +0,0 @@
1
- module DeviseUserbin
2
- module Views
3
- module Helpers
4
-
5
- def security_page_url(opts = {})
6
- scope = opts[:scope] || ::Devise.default_scope
7
- session_token = session["#{scope}_userbin"]
8
- Userbin.security_page_url(session_token)
9
- end
10
-
11
- end
12
- end
13
- end