Skip to content

Commit

Permalink
Add jwt 2.9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tuwukee committed Sep 18, 2024
1 parent ea829dc commit debc6a2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.2.3 (Septemper 17, 2024)

Support:

- add support for `jwt` to 2.9 version

## 3.2.2 (March 5, 2024)

Support:
Expand Down
2 changes: 1 addition & 1 deletion jwt_sessions.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
"bug_tracker_uri" => "https://github.com/tuwukee/jwt_sessions/issues"
}

s.add_dependency "jwt", ">= 2.8", "< 3"
s.add_dependency "jwt", ">= 2.9", "< 3"

s.add_development_dependency "bundler", ">= 2"
s.add_development_dependency "rake", "~> 13.1"
Expand Down
6 changes: 5 additions & 1 deletion lib/jwt_sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def jwt_options
end

def algorithm=(algo)
raise Errors::Malconfigured, "algorithm #{algo} is not supported" unless supported_algos.include?(algo)
unless algo == NONE
algorithm = JWT::JWA.resolve(algo)
raise Errors::Malconfigured, "algorithm #{algo} is not supported" unless algorithm
end

@algorithm = algo
end

Expand Down

0 comments on commit debc6a2

Please sign in to comment.