minimalist_authentication 2.5.0 → 2.5.2

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: 84db557ccbc7f085f52ff84ffedd5f174e8e3b14e7a2364389fe256b8373c120
4
+ data.tar.gz: fec50087c8cb8098e16d57fbf429096dbc43c87d66d9155947dd807cc54e5c99
5
5
  SHA512:
6
- metadata.gz: 80e51dd56527e25b5429ab051495e0bc0eb977b69edb08fe0eebab677fd4d4c68d729be1c78caebc3101e36285eb08465cc85b72f1fbde557b5772ed5686ccfa
7
- data.tar.gz: ffa0794cdba33332e420de6d7eff3f0ce3106ae738c73aefd2364170f829d09c4038ca47291155af8992764740c481627119c054c3b626517ff2d0d2d83112fd
6
+ metadata.gz: bca2d80847868c1929355733baab209436d7cfb0caa09289371626fa199924171e13359e2b3c38403cb30e8038614652cd042f903321622dfaca3d1582e179f3
7
+ data.tar.gz: ceed88e53ee975e757c9fd939e2e68a838f9219cfe8afd7b4a266f907521ecc5c70f15b68376f4f2764f52944709e9e0ef4a6f7a9554ae54ca3b87ce97a8a001
@@ -46,7 +46,7 @@ module MinimalistAuthentication
46
46
  end
47
47
 
48
48
  def store_location
49
- session["return_to"] = request.fullpath
49
+ session["return_to"] = url_for(request.params.merge(format: :html, only_path: true))
50
50
  end
51
51
 
52
52
  def redirect_back_or_default(default)
@@ -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.2"
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.2
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-10-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.