authentication-zero 2.3.4 → 2.3.5
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/authentication_generator.rb +2 -2
- data/lib/generators/authentication/templates/mailers/identity_mailer.rb.tt +1 -1
- data/lib/generators/authentication/templates/migrations/create_sessions_migration.rb.tt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdd056761c0aff038c46100fcbf3565da08adf2d020e250fddee0d8cc3ee27c4
|
|
4
|
+
data.tar.gz: 17effffa54f3a3d8dd017ac98804935a92e7bd24a540516ba2f0a7880326280a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7a1825d9930a6ca5f61f04076f9f859f75c6d8a496a4cb79abcdb7b46879de13dfc4e92e6db851413ce531b069fcae5c1981529bb6d8706705597fdeb7a040d
|
|
7
|
+
data.tar.gz: ee57e00000cd2cebd8b2f662392ac7324b24074fb79b47c9917e80d413946fecafa3fbd6b6b867bedf94480725698b4d1ec78c1606610e3373463cbfeba9b509
|
data/Gemfile.lock
CHANGED
|
@@ -55,7 +55,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def require_sudo
|
|
58
|
-
if
|
|
58
|
+
if Current.session.sudo_at < 30.minutes.ago
|
|
59
59
|
render json: { error: "Enter your password to continue" }, status: :forbidden
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -73,7 +73,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def require_sudo
|
|
76
|
-
if
|
|
76
|
+
if Current.session.sudo_at < 30.minutes.ago
|
|
77
77
|
redirect_to new_sudo_path(proceed_to_url: request.url)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -8,7 +8,7 @@ class IdentityMailer < ApplicationMailer
|
|
|
8
8
|
|
|
9
9
|
def email_verify_confirmation
|
|
10
10
|
@<%= singular_table_name %> = params[:<%= singular_table_name %>]
|
|
11
|
-
@signed_id = @<%= singular_table_name %>.signed_id(purpose: @<%= singular_table_name %>.email, expires_in:
|
|
11
|
+
@signed_id = @<%= singular_table_name %>.signed_id(purpose: @<%= singular_table_name %>.email, expires_in: 3.days)
|
|
12
12
|
|
|
13
13
|
mail to: @<%= singular_table_name %>.email, subject: "Verify your email"
|
|
14
14
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
|
2
2
|
def change
|
|
3
3
|
create_table :sessions do |t|
|
|
4
|
-
t.references
|
|
4
|
+
t.references :<%= singular_table_name %>, null: false, foreign_key: true
|
|
5
5
|
|
|
6
6
|
t.string :user_agent, null: false
|
|
7
7
|
t.string :ip_address, null: false
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: authentication-zero
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nixon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-02-
|
|
11
|
+
date: 2022-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|