devise_fido_usf 0.1.9 → 0.1.14
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1a83dffeb429d25957e553ab0dff96fb162343b889706f35cc2439c8fdf30cd7
|
4
|
+
data.tar.gz: f11dc2fbffa53f403eafafeae9f628ca53b88bab21ec4275df45addb1e8103f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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"
|
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
|
-
|
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.
|
23
|
-
$error.
|
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
|
-
|
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"
|
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
|
-
|
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.
|
25
|
-
$error.
|
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
|
-
|
43
|
+
<% 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.
|
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:
|
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
|
-
|
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.
|