jwt_auth_cognito 1.0.0.pre.beta.7 → 1.0.0.pre.beta.8
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/lib/jwt_auth_cognito/jwks_service.rb +14 -2
- data/lib/jwt_auth_cognito/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 890178b5dabf5d60fd718020edb4b3a53c7beb031edcbfe4530b2075643235d1
|
4
|
+
data.tar.gz: 0561a4d505653838b1a876ac2c09b96e149302b562c8ea7b0838a295770ad302
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd88dbfd8f4bba8480b7f9bc0fd8e277dc2c01c21ba4ada2a1011fc6080c2886cd78ebd00040382f04d9b80cc40e01754a24d0779417cdf94ec0c824cc7e8ceb
|
7
|
+
data.tar.gz: 6f96b767c1281c5be52be7a9c7911fc05e692b1fb48107ee96cbc2c3c659e819d5aaad4e1dded17e5f9d0c9aae201839cd3f7005ee43d1cff8fe7af0cd7ee37c
|
@@ -98,9 +98,21 @@ module JwtAuthCognito
|
|
98
98
|
n = base64url_decode(key_data['n'])
|
99
99
|
e = base64url_decode(key_data['e'])
|
100
100
|
|
101
|
+
# Create RSA key using method compatible with OpenSSL 3.0+
|
102
|
+
n_bn = OpenSSL::BN.new(n, 2)
|
103
|
+
e_bn = OpenSSL::BN.new(e, 2)
|
104
|
+
|
105
|
+
# Use the new constructor that accepts modulus and exponent
|
101
106
|
key = OpenSSL::PKey::RSA.new
|
102
|
-
|
103
|
-
|
107
|
+
|
108
|
+
# For OpenSSL 3.0+ compatibility, use set_key method if available
|
109
|
+
if key.respond_to?(:set_key)
|
110
|
+
key.set_key(n_bn, e_bn, nil)
|
111
|
+
else
|
112
|
+
# Fallback for older OpenSSL versions
|
113
|
+
key.n = n_bn
|
114
|
+
key.e = e_bn
|
115
|
+
end
|
104
116
|
|
105
117
|
key
|
106
118
|
end
|