token_authority 0.3.0 → 0.3.1

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: 8989a407b702176b74b3e121e4463dfc28e858097716c4cf6752f2ab54c78871
4
- data.tar.gz: 1ecdecd8785d3f214e64359b4ab7e43ecb8630eb2af9237bb5a4d8a604d5227d
3
+ metadata.gz: 30eb5cd2101ab6cc044d31d5dc15396ffef4c9efd955960c6dec70e57e613583
4
+ data.tar.gz: 6a24f7df903407dff09561e1ece8495c803dc6fa7175f0d3ff3641d8120ddc8f
5
5
  SHA512:
6
- metadata.gz: b3b4bbc0e464d6781255efe9b523d753abbe78843c5bec77c5057861eef157b112e099c4afbd8a073ef0f1d1f69fff1946f27dddb6d0ce95a9a91bb3e0bc6c34
7
- data.tar.gz: 0615a3d781b577ebb433bc5e01cae57827a8fe5bad6a6866092ea44438526e81090c28a39b708120150610c34a544fb4a405f8d9331f16e18f7943a27e55df3a
6
+ metadata.gz: 62f5c24dd950f5956817ca5531cd695b0ab3b1a2785e67c828c3ca116a2254ff25b376abf5db01cf9931da8bfce13c9869dbff332c8a8955f30009ef5e296a41
7
+ data.tar.gz: be5cd3a31b883f6bf7bc0b80a1d2d1d87bcfaa1dc4c8469d3c36b874aeac2a471cf0286a0c8c35e11b5a4fec0bb8b749a98acf9fc3709a4c26253bd0728637ec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.1] - 2025-01-25
4
+
5
+ ### Fixed
6
+
7
+ - Do not expire OAuth sessions when access tokens expire; this was preventing session refresh flow from completing successfully in some cases.
8
+
3
9
  ## [0.3.0] - 2025-01-24
4
10
 
5
11
  ### Added
@@ -69,8 +75,9 @@
69
75
 
70
76
  - Initial release
71
77
 
72
- [Unreleased]: https://github.com/dickdavis/token_authority/compare/v0.3.0...HEAD
73
- [0.2.1]: https://github.com/dickdavis/token_authority/compare/v0.2.1...v0.3.0
78
+ [Unreleased]: https://github.com/dickdavis/token_authority/compare/v0.3.1...HEAD
79
+ [0.3.1]: https://github.com/dickdavis/token_authority/compare/v0.3.0...v0.3.1
80
+ [0.3.0]: https://github.com/dickdavis/token_authority/compare/v0.2.1...v0.3.0
74
81
  [0.2.1]: https://github.com/dickdavis/token_authority/compare/v0.2.0...v0.2.1
75
82
  [0.2.0]: https://github.com/dickdavis/token_authority/compare/v0.1.0...v0.2.0
76
83
  [0.1.0]: https://github.com/dickdavis/token_authority/releases/tag/v0.1.0
@@ -33,6 +33,8 @@ module TokenAuthority
33
33
  include ActiveModel::Validations
34
34
  include ActiveModel::Validations::Callbacks
35
35
 
36
+ class_attribute :expire_session_on_expiration, default: true
37
+
36
38
  attr_accessor :aud, :exp, :iat, :iss, :jti
37
39
 
38
40
  validates :jti, presence: true
@@ -80,6 +82,7 @@ module TokenAuthority
80
82
 
81
83
  def errors_for_expirable_claims?
82
84
  return false if skip_token_authority_session_update?
85
+ return false unless self.class.expire_session_on_expiration
83
86
 
84
87
  errors.attribute_names.intersect?(EXPIRABLE_CLAIMS)
85
88
  end
@@ -31,6 +31,8 @@ module TokenAuthority
31
31
  class AccessToken
32
32
  include TokenAuthority::ClaimValidatable
33
33
 
34
+ self.expire_session_on_expiration = false
35
+
34
36
  # @!attribute [rw] sub
35
37
  # The subject identifier (resource owner) per RFC 9068.
36
38
  # @return [String]
@@ -2,5 +2,5 @@ module TokenAuthority
2
2
  # The current version of the TokenAuthority gem.
3
3
  #
4
4
  # @return [String] the version string in semantic versioning format
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: token_authority
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dick Davis