jwt-eddsa 1.0.0 → 1.1.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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +5 -0
- data/lib/jwt/eddsa/jwk/okp.rb +10 -1
- data/lib/jwt/eddsa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fd1fa6708f4279dfe06ff4791c7deb54acfa4bd780908d11a38a163d3a805a1
|
|
4
|
+
data.tar.gz: 48ecc05c4127c72ac7ef0ea65aa142ad4ea69aab18763a7a73183118b87514c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: feb697c45c25e28a42c874a065afdfc92a72f45f5ac16905c7e12f08f4ccbfcf5844bfd12c440eec03819956b87dbccd0f6cefbe2dd82374b91a476db31b0c99
|
|
7
|
+
data.tar.gz: 3e3ab7aaf6daeeecb37780f31b7648370cab56f46ae4eea2390719c83040682c4af349fa5935c945f06fca672d0183a911e5dd9c54aa0913f86fba52f614b0bb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/jwt/ruby-jwt-eddsa/compare/v1.0.0...v1.1.0) (2026-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* allow exporting OKP JWKs with unsupported curves ([#32](https://github.com/jwt/ruby-jwt-eddsa/issues/32)) ([9f26d0d](https://github.com/jwt/ruby-jwt-eddsa/commit/9f26d0db5eb69a91377a82a7f8cc21a7ae991c2c))
|
|
9
|
+
* reject unsupported OKP curves ([#29](https://github.com/jwt/ruby-jwt-eddsa/issues/29)) ([032cfa9](https://github.com/jwt/ruby-jwt-eddsa/commit/032cfa925ad6e123712edf2c83723a873bc6f4e7))
|
|
10
|
+
|
|
3
11
|
## [1.0.0](https://github.com/jwt/ruby-jwt-eddsa/compare/v0.9.0...v1.0.0) (2026-08-14)
|
|
4
12
|
|
|
5
13
|
|
data/README.md
CHANGED
|
@@ -27,6 +27,11 @@ token = JWT.encode({pay: "load"}, private_key, "EdDSA")
|
|
|
27
27
|
payload, header = JWT.decode(token, private_key.verify_key, true, algorithm: "EdDSA")
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
OKP JWKs must specify `crv: "Ed25519"` to provide a signing or verification key.
|
|
31
|
+
Requesting a key with a missing or unsupported curve (including `X25519` and
|
|
32
|
+
`Ed448`) raises `JWT::JWKError`. Such JWKs can still be imported, so an unrelated
|
|
33
|
+
key in a mixed JWKS does not prevent verification with a selected Ed25519 key.
|
|
34
|
+
|
|
30
35
|
## Development
|
|
31
36
|
|
|
32
37
|
```
|
data/lib/jwt/eddsa/jwk/okp.rb
CHANGED
|
@@ -23,12 +23,14 @@ module JWT
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def verify_key
|
|
26
|
+
check_curve!
|
|
26
27
|
return @verify_key if defined?(@verify_key)
|
|
27
28
|
|
|
28
29
|
@verify_key = verify_key_from_parameters
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
def signing_key
|
|
33
|
+
check_curve!
|
|
32
34
|
return @signing_key if defined?(@signing_key)
|
|
33
35
|
|
|
34
36
|
@signing_key = signing_key_from_parameters
|
|
@@ -39,7 +41,7 @@ module JWT
|
|
|
39
41
|
end
|
|
40
42
|
|
|
41
43
|
def private?
|
|
42
|
-
!
|
|
44
|
+
!self[:d].nil?
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
def members
|
|
@@ -93,6 +95,13 @@ module JWT
|
|
|
93
95
|
"Incorrect 'kty' value: #{key_params[:kty]}, expected #{KTY}"
|
|
94
96
|
end
|
|
95
97
|
|
|
98
|
+
def check_curve!
|
|
99
|
+
return if self[:crv] == "Ed25519"
|
|
100
|
+
|
|
101
|
+
raise JWT::JWKError,
|
|
102
|
+
"Incorrect 'crv' value: #{self[:crv]}, expected Ed25519"
|
|
103
|
+
end
|
|
104
|
+
|
|
96
105
|
def parse_okp_key_params(verify_key, signing_key = nil)
|
|
97
106
|
params = {
|
|
98
107
|
kty: KTY,
|
data/lib/jwt/eddsa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jwt-eddsa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joakim Antman
|
|
@@ -78,7 +78,7 @@ licenses:
|
|
|
78
78
|
metadata:
|
|
79
79
|
homepage_uri: https://github.com/jwt/ruby-jwt-eddsa
|
|
80
80
|
source_code_uri: https://github.com/jwt/ruby-jwt-eddsa
|
|
81
|
-
changelog_uri: https://github.com/jwt/ruby-jwt-eddsa/blob/v1.
|
|
81
|
+
changelog_uri: https://github.com/jwt/ruby-jwt-eddsa/blob/v1.1.0/CHANGELOG.md
|
|
82
82
|
rubygems_mfa_required: 'true'
|
|
83
83
|
rdoc_options: []
|
|
84
84
|
require_paths:
|