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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70f497dd8ed75e1f18c31ef969a0813537d5f80ac72b178fef396347840fd752
4
- data.tar.gz: 5d8ab5264ece31d0fe9b14865353bae79d603fac87fcf9417c0dfa58b7c67361
3
+ metadata.gz: bdd056761c0aff038c46100fcbf3565da08adf2d020e250fddee0d8cc3ee27c4
4
+ data.tar.gz: 17effffa54f3a3d8dd017ac98804935a92e7bd24a540516ba2f0a7880326280a
5
5
  SHA512:
6
- metadata.gz: 3d7ed564b16eba4c19fd2a107b8b8e5e256a2b8d7203130c0b1c4c6dac802503bef8c5a98fac02053a20660ab11f5cc2b39f0fc0d46d2fbe8720cd385573adf5
7
- data.tar.gz: f9214fcb6e2653acd3dc4687992142848cd1e6a71cb050a1fa1ea02d2f57ec672b346d4ab234027bb37b170a20cdbce4d8d63adac81894b4b06519fefab1a060
6
+ metadata.gz: f7a1825d9930a6ca5f61f04076f9f859f75c6d8a496a4cb79abcdb7b46879de13dfc4e92e6db851413ce531b069fcae5c1981529bb6d8706705597fdeb7a040d
7
+ data.tar.gz: ee57e00000cd2cebd8b2f662392ac7324b24074fb79b47c9917e80d413946fecafa3fbd6b6b867bedf94480725698b4d1ec78c1606610e3373463cbfeba9b509
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.3.4)
4
+ authentication-zero (2.3.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.3.4"
2
+ VERSION = "2.3.5"
3
3
  end
@@ -55,7 +55,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
55
55
  end
56
56
 
57
57
  def require_sudo
58
- if Time.current > 30.minutes.after(Current.session.sudo_at)
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 Time.current > 30.minutes.after(Current.session.sudo_at)
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: 20.minutes)
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 :user, null: false, foreign_key: true
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
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-26 00:00:00.000000000 Z
11
+ date: 2022-02-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: