authentication-zero 2.16.2 → 2.16.3

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
  SHA256:
3
- metadata.gz: fa899dd7d78a0c135998ca417f8adb5c412b1f7fb5cc3fb84839d8992dc5dd1c
4
- data.tar.gz: af3d846901b8810cb49bb4be027f5c107514bd8f03c4ecda80947ffe5bb4847d
3
+ metadata.gz: 4a9f5862b8b603990471ab970d13cf934f73252c55a734a39a90198406066a75
4
+ data.tar.gz: d6bf9bda2ef8d19df6da9207e40e5621eb1157b2073921ff5dbee6ce00ff22a2
5
5
  SHA512:
6
- metadata.gz: 1f83cb1e7672a469ac38fade46e2feeb1200366fd6d8b57efdc0f6d871099a3cb18f3bd35421bb721c9c367cc21061fbc79055c8481e2c8c30765123e8b3dfa8
7
- data.tar.gz: 4516a0ae989e67eb5d9dc23ec72965107031fa7d6a52f0a0c392225c816b1e9daac3d07168e9be135c84940d684fd393a6d31e191cdffcac8b682b61251187d6
6
+ metadata.gz: 8ccdcba2c6dd5edf45b60acd1462ef02eb46bf4e4f9a9a0a7860a2e840ff18f58a1d655b2f9e7f3c45cc497aac04fc269ae86186df6cbdbfb70f46e51bc49db0
7
+ data.tar.gz: e70d3a8012378093f060dc5084089ed77c87d6cc271db810b624c588324797e7c1748bd1bc345a5d5dce2ff0f3e6cabab7ba1f20e3abc8d3e7e590c43a799844
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.2)
4
+ authentication-zero (2.16.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -18,7 +18,7 @@ The purpose of authentication zero is to generate a pre-built authentication sys
18
18
  - Ask password before sensitive data changes, aka: sudo (--sudoable)
19
19
  - Reset the user password and send reset instructions
20
20
  - Reset the user password only from verified emails
21
- - Lock sending reset password email after many attempts (--lockable)
21
+ - Lock mechanism for resetting password and sign-in (--lockable)
22
22
  - Send e-mail confirmation when your email has been changed
23
23
  - Send e-mail notification when someone has logged into your account
24
24
  - Manage multiple sessions & devices
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.2"
2
+ VERSION = "2.16.3"
3
3
  end
@@ -1,6 +1,9 @@
1
1
  class SessionsController < ApplicationController
2
2
  skip_before_action :authenticate, only: :create
3
3
 
4
+ <%- if options.lockable? -%>
5
+ before_action :require_lock, only: :create
6
+ <%- end -%>
4
7
  before_action :set_session, only: %i[ show destroy ]
5
8
 
6
9
  def index
@@ -1,6 +1,9 @@
1
1
  class SessionsController < ApplicationController
2
2
  skip_before_action :authenticate, only: %i[ new create ]
3
3
 
4
+ <%- if options.lockable? -%>
5
+ before_action :require_lock, only: :create
6
+ <%- end -%>
4
7
  before_action :set_session, only: :destroy
5
8
 
6
9
  def index
@@ -29,7 +29,6 @@ class User < ApplicationRecord
29
29
  after_update if: :password_digest_previously_changed? do
30
30
  sessions.where.not(id: Current.session).destroy_all
31
31
  end
32
-
33
32
  <%- if options.trackable? %>
34
33
  after_update if: :email_previously_changed? do
35
34
  events.create! action: "email_verification_requested"
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.16.2
4
+ version: 2.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-30 00:00:00.000000000 Z
11
+ date: 2023-01-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: