prx_auth-rails 5.1.0 → 5.1.2

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: 124726d6ef61cdf5bf7d71870c7514f7874f44b784e2353efac7951f36f59764
4
- data.tar.gz: 7134d6d1377fbc2da50ca60504b8b6b43f0c71fc21bbea224d70c3113e451801
3
+ metadata.gz: 67d25a8964b81d3bcd8b1bf94ae841d4c6f9889feb60e743e7fbf6666cccedcc
4
+ data.tar.gz: b38f5b10f5fd805a7da1042b960dbc043d8d8155b8939afd864608c6e116e18a
5
5
  SHA512:
6
- metadata.gz: 53b70c3532e7f0dac4239ed0116c9ca7037833c2e8c9229f9b3dd0bb3b8b6ce07bfc6a9c2045a5a2c480420a5098b9de69c9476a90f18aebe27c10a7c57a8ec5
7
- data.tar.gz: 65ba582af67b581eba8b2fbe3770ba41afda4ae12d0606fe98b575a230b2a10c3439b9c8074b045ac3c5ffd45e951c0f099317997754d1b53cfa543183080e4f
6
+ metadata.gz: a086fa2bf2e116cdbfdef974f037cc31fd308250b3fadb85dad4bdf7a7c9a4698045518854af33e9feae241867c0ce7ebebe054d1c02db206ab84db72c14b78e
7
+ data.tar.gz: ecc6784b2b47249b619b8c9801fe34428f91f933035b7416e61f725b2be68d753dc3a8bdbdc54acb506ce4cdea4ac2100fa5cadf6b70ec5febf0f5885b4d79c8
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PrxAuth::Rails
4
4
  class SessionsController < ApplicationController
5
- skip_before_action :set_after_sign_in_path, :authenticate!, raise: false
5
+ skip_before_action :authenticate!, raise: false
6
6
 
7
7
  before_action :set_nonce!, only: [:new, :show]
8
8
 
@@ -70,6 +70,7 @@ module PrxAuth::Rails
70
70
  sign_out_user
71
71
  session[WILDCARD_SESSION_KEY] = wildcard
72
72
 
73
+ set_after_sign_in_path(request.referer.presence || "/")
73
74
  redirect_to new_sessions_path
74
75
  end
75
76
 
@@ -18,7 +18,7 @@ module PrxAuth
18
18
  PRX_REFRESH_BACK_KEY = "prx.auth.back".freeze
19
19
 
20
20
  included do
21
- before_action :set_after_sign_in_path, :authenticate!
21
+ before_action :authenticate!
22
22
  end
23
23
 
24
24
  def prx_auth_token
@@ -30,8 +30,8 @@ module PrxAuth
30
30
  nil
31
31
  end
32
32
 
33
- def set_after_sign_in_path
34
- session[PRX_REFRESH_BACK_KEY] = request.fullpath
33
+ def set_after_sign_in_path(path = nil)
34
+ session[PRX_REFRESH_BACK_KEY] = path || request.fullpath
35
35
  end
36
36
 
37
37
  def prx_jwt
@@ -44,6 +44,7 @@ module PrxAuth
44
44
 
45
45
  def authenticate!
46
46
  if !current_user
47
+ set_after_sign_in_path
47
48
  redirect_to new_sessions_path
48
49
  elsif !current_user_access?
49
50
  redirect_to access_error_sessions_path
@@ -29,6 +29,14 @@ class PrxAuth::Rails::Token
29
29
  @token_data.user_id
30
30
  end
31
31
 
32
+ def issued_at
33
+ @token_data.issued_at
34
+ end
35
+
36
+ def expiration_time
37
+ @token_data.expiration_time
38
+ end
39
+
32
40
  def authorized_account_ids(scope)
33
41
  @token_data.authorized_account_ids(scope)
34
42
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PrxAuth
4
4
  module Rails
5
- VERSION = "5.1.0"
5
+ VERSION = "5.1.2"
6
6
  end
7
7
  end
@@ -28,7 +28,7 @@ module PrxAuth
28
28
  host = configuration.id_host
29
29
  path = configuration.cert_path
30
30
  protocol =
31
- if host.include?("localhost") || host.include?("127.0.0.1")
31
+ if host&.include?("localhost") || host&.include?("127.0.0.1")
32
32
  "http"
33
33
  else
34
34
  "https"
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency "webmock"
33
33
  spec.add_development_dependency "standard"
34
34
 
35
- spec.add_runtime_dependency "prx_auth", ">= 1.8.0"
35
+ spec.add_runtime_dependency "prx_auth", ">= 1.8.2"
36
36
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prx_auth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Rhoden
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-23 00:00:00.000000000 Z
10
+ date: 2025-07-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: actionpack
@@ -183,14 +183,14 @@ dependencies:
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- version: 1.8.0
186
+ version: 1.8.2
187
187
  type: :runtime
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: 1.8.0
193
+ version: 1.8.2
194
194
  description: Rails integration for next generation PRX Authorization system.
195
195
  email:
196
196
  - carhoden@gmail.com