jwt-eddsa 0.8.0 → 0.9.0

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: cc916caa4e073e331d69c6283e4aea445e62bcf9e6b2987858585f7077b214b5
4
- data.tar.gz: 1694c17a66ada64e581675fa824bca3db8d63ab5ce5ade178e5310a42f027e8c
3
+ metadata.gz: d176aca754fd2612a100a6dbccc5cb7452258d61113899aef72bbfeffd8a35a0
4
+ data.tar.gz: d9b57d2a032a47bc8bcf313782652c7f7e5404639dff0a230a20d0b9d27d42c5
5
5
  SHA512:
6
- metadata.gz: 1fc1cfd81aaf659a68f63668f583b991a5c80ef2bc6f97e71e578da388f2da950ecfa7e6ba4017a12d6d1f82f6f363f33abf11f4f16de19482b40dd9380c4351
7
- data.tar.gz: 61265cb2bda5a758881aef68e5364b07ec0a7c6c3345a74596488e8ba844e345715b1555c8735f98944d933b428ee25877d99405e718c2a452d44ca68b5c2339
6
+ metadata.gz: 3ac0969bd6a41c3ee85cedaf88b1183743fafcf42a5eddef4dc3736be013578a3d9d79b6fe1e69dab327632b84a5d185c33e925d538636d055fcb1196f03e05f
7
+ data.tar.gz: e5aeb285f6c04b604713bd63ab58dc41ac3d24c6c7617382e09774f81c094f5f4966385a7ac3a3692bfba87ceaab4bd8fecb1f56446d6289e11d0e037a352500
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.8.0"
2
+ ".": "0.9.0"
3
3
  }
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.4
1
+ 3.4.4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.0](https://github.com/jwt/ruby-jwt-eddsa/compare/v0.8.1...v0.9.0) (2025-06-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * Support resolving JWA from crv parameter in JWK ([#24](https://github.com/jwt/ruby-jwt-eddsa/issues/24)) ([76ab43b](https://github.com/jwt/ruby-jwt-eddsa/commit/76ab43b14c27f477c78e6a8aaee7bcfb56d1d4a7))
9
+
10
+ ## [0.8.1](https://github.com/jwt/ruby-jwt-eddsa/compare/v0.8.0...v0.8.1) (2025-06-27)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Change the urls for the repo ([#22](https://github.com/jwt/ruby-jwt-eddsa/issues/22)) ([238d2ed](https://github.com/jwt/ruby-jwt-eddsa/commit/238d2ed6719d8f5e83e74907ac7ea81b4184bf05))
16
+
3
17
  ## [0.8.0](https://github.com/anakinj/jwt-eddsa/compare/v0.7.1...v0.8.0) (2024-09-15)
4
18
 
5
19
 
data/README.md CHANGED
@@ -1,32 +1,28 @@
1
1
  # jwt-eddsa
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/jwt-eddsa.svg)](https://badge.fury.io/rb/jwt-eddsa)
4
- [![Build status](https://github.com/anakinj/jwt-eddsa/actions/workflows/test.yml/badge.svg)](https://github.com/anakinj/jwt-eddsa/actions/workflows/test.yml)
4
+ [![Build status](https://github.com/jwt/ruby-jwt-eddsa/actions/workflows/test.yml/badge.svg)](https://github.com/jwt/ruby-jwt-eddsa/actions/workflows/test.yml)
5
5
 
6
6
  A library extending the ruby-jwt gem with EdDSA algorithms. Based on [RFC 8037](https://datatracker.ietf.org/doc/html/rfc8037).
7
7
 
8
- **NOTE: This gem is still WIP**
9
-
10
- Work is currently done in [ruby-jwt](https://github.com/jwt/ruby-jwt/pull/607) to allow extending the algorithms.
11
-
12
- Plan is to replace rbnacl with something else in the near future.
13
-
14
8
  ## Installation
15
9
 
16
- Will only work with the WIP branch, so adding the following to your the Gemfile should do the trick:
10
+ Add the gem to your Gemfile:
11
+
17
12
  ```
18
- gem "jwt", github: "anakinj/ruby-jwt", branch: "extendable-algos"
19
13
  gem "jwt-eddsa"
20
14
  ```
21
15
 
16
+ And in your application add the following require:
17
+
22
18
  ```
23
- require "jwt/eddsa" # not verified if this actually works
19
+ require "jwt/eddsa"
24
20
  ```
25
21
 
26
22
  ## Usage
27
23
 
28
24
  ```ruby
29
- private_key = RbNaCl::Signatures::Ed25519::SigningKey.new("b" * 32)
25
+ private_key = Ed25519::SigningKey.new("b" * 32)
30
26
  token = JWT.encode({pay: "load"}, private_key, "EdDSA")
31
27
  payload, header = JWT.decode(token, private_key.verify_key, true, algorithm: "EdDSA")
32
28
  ```
@@ -40,7 +36,7 @@ bundle exec rake
40
36
 
41
37
  ## Contributing
42
38
 
43
- Bug reports and pull requests are welcome on GitHub at https://github.com/anakinj/jwt-eddsa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/anakinj/jwt-eddsa/blob/main/CODE_OF_CONDUCT.md).
39
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jwt/ruby-jwt-eddsa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/jwt/ruby-jwt-eddsa/blob/main/CODE_OF_CONDUCT.md).
44
40
 
45
41
  In this repository, pull request titles must follow the [Conventional Commit](https://www.conventionalcommits.org/) specification to ensure clear and consistent communication of changes.
46
42
 
@@ -50,4 +46,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
50
46
 
51
47
  ## Code of Conduct
52
48
 
53
- Everyone interacting in the jwt-eddsa project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/anakinj/jwt-eddsa/blob/main/CODE_OF_CONDUCT.md).
49
+ Everyone interacting in the jwt-eddsa project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jwt/ruby-jwt-eddsa/blob/main/CODE_OF_CONDUCT.md).
@@ -56,6 +56,12 @@ module JWT
56
56
  exported
57
57
  end
58
58
 
59
+ def jwa
60
+ return super if self[:alg]
61
+
62
+ JWA.resolve("EdDSA") if self[:crv] == "Ed25519"
63
+ end
64
+
59
65
  private
60
66
 
61
67
  def extract_key_params(key) # rubocop:disable Metrics/MethodLength
@@ -2,6 +2,6 @@
2
2
 
3
3
  module JWT
4
4
  module EdDSA
5
- VERSION = "0.8.0"
5
+ VERSION = "0.9.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt-eddsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Antman
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-09-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: base64
@@ -73,15 +72,14 @@ files:
73
72
  - lib/jwt/eddsa/jwk/okp.rb
74
73
  - lib/jwt/eddsa/version.rb
75
74
  - release-please-config.json
76
- homepage: https://github.com/anakinj/jwt-eddsa
75
+ homepage: https://github.com/jwt/ruby-jwt-eddsa
77
76
  licenses:
78
77
  - MIT
79
78
  metadata:
80
- homepage_uri: https://github.com/anakinj/jwt-eddsa
81
- source_code_uri: https://github.com/anakinj/jwt-eddsa
82
- changelog_uri: https://github.com/anakinj/jwt-eddsa/blob/v0.8.0/CHANGELOG.md
79
+ homepage_uri: https://github.com/jwt/ruby-jwt-eddsa
80
+ source_code_uri: https://github.com/jwt/ruby-jwt-eddsa
81
+ changelog_uri: https://github.com/jwt/ruby-jwt-eddsa/blob/v0.9.0/CHANGELOG.md
83
82
  rubygems_mfa_required: 'true'
84
- post_install_message:
85
83
  rdoc_options: []
86
84
  require_paths:
87
85
  - lib
@@ -96,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
94
  - !ruby/object:Gem::Version
97
95
  version: '0'
98
96
  requirements: []
99
- rubygems_version: 3.5.16
100
- signing_key:
97
+ rubygems_version: 3.6.7
101
98
  specification_version: 4
102
99
  summary: EdDSA algorithm extension for ruby-jwt
103
100
  test_files: []