devise_fido_usf 0.1.9 → 0.1.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3d90267eadbc24aa9ddce8fb25b64dcb93ef5fa4
4
- data.tar.gz: ddf253bb5492590a1a1c008c30cac21c69d5c332
2
+ SHA256:
3
+ metadata.gz: 1a83dffeb429d25957e553ab0dff96fb162343b889706f35cc2439c8fdf30cd7
4
+ data.tar.gz: f11dc2fbffa53f403eafafeae9f628ca53b88bab21ec4275df45addb1e8103f7
5
5
  SHA512:
6
- metadata.gz: e4f23e9be4a9d39d20abd22564d63c0d8f64cf45f38bf270aaddab0a65618671358c1961db6c44c7e63a42da85b2dbad4b425a63643497df33bbc841a5eadbb1
7
- data.tar.gz: fd66db81a68d567291aba7227991bd75ec8c5735ddf69857ee9bcac360a68b2a126434ddefe1f8381f6e8b930e68b50be328279adbc1ead6019fad33a7a0ba6d
6
+ metadata.gz: a094361c59d3e0eafdc5741b1ca80f885358132f74d674e20e0b3476237832c4e6014b3c621b5e01e38eea25915ecce7e3e696ad4fc989d78f6509d85762c75d
7
+ data.tar.gz: 838364fec88d80c79b27bc3866960c9d93ea37f99ed222677ca63b9c8085f2171d8408429a3680ed5749c0aca29ec358d75c4b9391137e3547ea2096f74fc4b7
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # FIDO U2F Authentication for Rails Devise
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/devise_fido_usf.svg)](https://badge.fury.io/rb/devise_fido_usf)
4
- [![Dependency Status](https://gemnasium.com/badges/github.com/CyberDeck/devise-fido-u2f.svg)](https://gemnasium.com/github.com/CyberDeck/devise-fido-u2f)
5
4
  [![Build Status](https://travis-ci.org/CyberDeck/devise-fido-u2f.svg?branch=master)](https://travis-ci.org/CyberDeck/devise-fido-u2f)
6
5
  [![Code Climate](https://codeclimate.com/github/CyberDeck/devise-fido-u2f/badges/gpa.svg)](https://codeclimate.com/github/CyberDeck/devise-fido-u2f)
7
6
  [![Coverage Status](https://coveralls.io/repos/github/CyberDeck/devise-fido-u2f/badge.svg)](https://coveralls.io/github/CyberDeck/devise-fido-u2f)
@@ -1,6 +1,8 @@
1
1
  class Devise::FidoUsfRegistrationsController < ApplicationController
2
2
  before_action :authenticate_resource!
3
3
 
4
+ respond_to :html, :js
5
+
4
6
  def new
5
7
  @registration_requests = u2f.registration_requests
6
8
  session[:challenges] = @registration_requests.map(&:challenge)
@@ -55,10 +57,7 @@ class Devise::FidoUsfRegistrationsController < ApplicationController
55
57
  session.delete(:challenges)
56
58
  end
57
59
 
58
- respond_to do |format|
59
- format.js
60
- format.html { redirect_to fido_usf_registration_url }
61
- end
60
+ respond_with resource, location: after_sign_in_path_for(resource)
62
61
  end
63
62
 
64
63
  def update
@@ -1,11 +1,11 @@
1
1
  <h2>Authenticate key</h2>
2
2
  <p>Please insert one of your registered keys and press the button within 15 seconds</p>
3
3
  <p id="waiting">Waiting...</p>
4
- <p id="error" style="display: none;"></p>
4
+ <p id="error" class="d-none"></p>
5
5
  <%= form_tag send("#{resource_name}_fido_usf_authentication_path"), method: 'post' do %>
6
6
  <%= hidden_field_tag :response %>
7
7
  <% end %>
8
- <script>
8
+ <%= javascript_tag nonce: true do -%>
9
9
  var appId = <%= @app_id.to_json.html_safe %>;
10
10
  var signRequests = <%= @sign_requests.to_json.html_safe %>;
11
11
  var challenge = <%= @challenge.to_json.html_safe %>;
@@ -19,8 +19,8 @@
19
19
  5: 'Authentication timed out. Please reload to try again.'
20
20
  };
21
21
  var setError = function(code) {
22
- $waiting.style.display = 'none';
23
- $error.style.display = 'block';
22
+ $waiting.className += ' d-none';
23
+ $error.className = $error.className.replace(/\bd-none\b/g, '');
24
24
  $error.innerHTML = errorMap[code];
25
25
  };
26
26
 
@@ -38,4 +38,4 @@
38
38
 
39
39
  form.submit();
40
40
  }, 15);
41
- </script>
41
+ <% end -%>
@@ -1,13 +1,13 @@
1
1
  <h2>Register key</h2>
2
2
  <p>Please insert the key and press the button within 15 seconds</p>
3
3
  <p id="waiting">Waiting...</p>
4
- <p id="error" style="display: none;"></p>
4
+ <p id="error" class="d-none"></p>
5
5
 
6
6
  <%= form_tag send("#{resource_name}_fido_usf_registration_path"), method: 'post' do %>
7
7
  <%= hidden_field_tag :response %>
8
8
  <% end %>
9
9
 
10
- <script>
10
+ <%= javascript_tag nonce: true do -%>
11
11
  var appId = <%= @app_id.to_json.html_safe %>;
12
12
  var registerRequests = <%= @registration_requests.to_json.html_safe %>;
13
13
  var signRequests = <%= @sign_requests.to_json.html_safe %>;
@@ -21,8 +21,8 @@
21
21
  5: 'Authentication timed out. Please reload to try again.'
22
22
  };
23
23
  var setError = function(code) {
24
- $waiting.style.display = 'none';
25
- $error.style.display = 'block';
24
+ $waiting.className += ' d-none';
25
+ $error.className = $error.className.replace(/\bd-none\b/g, '');
26
26
  $error.innerHTML = errorMap[code];
27
27
  };
28
28
 
@@ -40,4 +40,4 @@
40
40
 
41
41
  form.submit();
42
42
  }, 15);
43
- </script>
43
+ <% end -%>
@@ -1,3 +1,3 @@
1
1
  module DeviseFidoUsf
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_fido_usf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - H. Gregor Molter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-24 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -242,10 +242,14 @@ files:
242
242
  - lib/generators/templates/README
243
243
  - lib/generators/templates/migration.rb
244
244
  - lib/tasks/devise_fido_usf_tasks.rake
245
- homepage: https://github.com/CyberDeck/devise-fido-u2f/
245
+ homepage: https://github.com/CyberDeck/devise-fido-u2f
246
246
  licenses:
247
247
  - MIT
248
- metadata: {}
248
+ metadata:
249
+ homepage_uri: https://github.com/cyberdeck/devise-fido-u2f
250
+ changelog_uri: https://github.com/cyberdeck/devise-fido-u2f/blob/master/CHANGELOG.md
251
+ source_code_uri: https://github.com/cyberdeck/devise-fido-u2f/
252
+ bug_tracker_uri: https://github.com/cyberdeck/devise-fido-u2f/issues
249
253
  post_install_message:
250
254
  rdoc_options: []
251
255
  require_paths:
@@ -261,8 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
265
  - !ruby/object:Gem::Version
262
266
  version: '0'
263
267
  requirements: []
264
- rubyforge_project:
265
- rubygems_version: 2.5.2.1
268
+ rubygems_version: 3.0.3
266
269
  signing_key:
267
270
  specification_version: 4
268
271
  summary: A Devise module to allow FIDO U2F authentication.