minimalist_authentication 2.5.0 → 2.5.1

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: 25d502e7b51492503999384a150dfa8def1fbf82e2f46b944f8c2d7f074f25ee
4
- data.tar.gz: 4439ecaa9f20370c64b1d5d368d53a300000d1ad7835687b70b9cccff0e8f74e
3
+ metadata.gz: 7d59f6a8045fd0f25d5e142e38c5080a084c1d7df63963fdb9e6fa161bd3516b
4
+ data.tar.gz: 28cbe52a31186ed03df8d988474d2d7419c6ba19dc678608a0d2502b698e30b5
5
5
  SHA512:
6
- metadata.gz: 80e51dd56527e25b5429ab051495e0bc0eb977b69edb08fe0eebab677fd4d4c68d729be1c78caebc3101e36285eb08465cc85b72f1fbde557b5772ed5686ccfa
7
- data.tar.gz: ffa0794cdba33332e420de6d7eff3f0ce3106ae738c73aefd2364170f829d09c4038ca47291155af8992764740c481627119c054c3b626517ff2d0d2d83112fd
6
+ metadata.gz: 3affcfacdbe213d469c484c0759a5038a90d99afea3d869db514e5ddc47575459a8c5b678aeb9259c008a5d1b89b89247eac9887d92de4812bd3f3825c1d40d6
7
+ data.tar.gz: 9a60f4023d3c414817f2a514e135d2e23865c478f8d94f2aab41f5b83f31300f9ea403e845c27014fdd659abc632ac77963924ed9f51e3fdf1f85d58a62e7883
@@ -24,7 +24,7 @@ module MinimalistAuthentication
24
24
 
25
25
  def destroy
26
26
  scrub_session!
27
- redirect_to logout_redirect_to, notice: t(".notice")
27
+ redirect_to logout_redirect_to, notice: t(".notice"), status: :see_other
28
28
  end
29
29
 
30
30
  private
@@ -73,7 +73,7 @@ module MinimalistAuthentication
73
73
  def after_authentication_failure
74
74
  flash.now.alert = t(".alert", identifier: identifier)
75
75
  user
76
- render :new
76
+ render :new, status: :unprocessable_entity
77
77
  end
78
78
 
79
79
  def identifier
@@ -47,7 +47,7 @@ module MinimalistAuthentication
47
47
  def authenticate(params)
48
48
  ActiveSupport::Deprecation.warn(<<-MSG.squish)
49
49
  Calling #{MinimalistAuthentication.configuration.user_model_name}::authenticate is deprecated.
50
- Use MinimalistAuthentication::Authenticator.authenticate_user instead.
50
+ Use MinimalistAuthentication::Authenticator.authenticated_user instead.
51
51
  MSG
52
52
  MinimalistAuthentication::Authenticator.authenticated_user(params)
53
53
  end
@@ -63,10 +63,10 @@ module MinimalistAuthentication
63
63
  !active?
64
64
  end
65
65
 
66
- # Returns true if password matches the hashed_password, otherwise returns nil. Upon successful
66
+ # Returns true if password matches the hashed_password, otherwise returns false. Upon successful
67
67
  # authentication the user's password_hash is updated if required.
68
68
  def authenticated?(password)
69
- return unless password_object == password
69
+ return false unless password_object == password
70
70
 
71
71
  update_hash!(password) if password_object.stale?
72
72
  true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MinimalistAuthentication
4
- VERSION = "2.5.0"
4
+ VERSION = "2.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimalist_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-16 00:00:00.000000000 Z
12
+ date: 2023-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bcrypt
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.4.5
116
+ rubygems_version: 3.4.15
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: A Rails authentication plugin that takes a minimalist approach.