keycardai-oauth 0.8.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/keycardai/oauth/authorization_code.rb +10 -3
- data/lib/keycardai/oauth/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: 9b06d9181e8d3dfbae0c141bcc8b4ffd4850f49f247fd3115ac3b8aa2a745920
|
|
4
|
+
data.tar.gz: 2b698ca8fa9dd2f0d002148aa3d54698fd48a43b2666356b358d5db749ea5402
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36a13be3a6755509270f5aa88d06ea093a31c9c3191c66c85c6249829d56d0672d0e4d454ca738c5d2d00318d927055d2bb5fd280391fc622f2e9cd329e24441
|
|
7
|
+
data.tar.gz: ebeb9a7e16fd639899d677ebd00d83f987a8993d68d02be5e1eefdcd1abc60c8d53b1d4e4c51d19f4c635136e54847bc6c5533c22842b5a81d777ce3c0981b04
|
data/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,13 @@ the loopback flow (RFC 8252), JWT signing and verification with a caching JWKS
|
|
|
15
15
|
keyring, the three application credentials (ClientSecret with multi-zone,
|
|
16
16
|
WebIdentity, WorkloadIdentity with pluggable token sources), and AccessContext.
|
|
17
17
|
|
|
18
|
+
## 0.8.1-keycardai-oauth (2026-11-25)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
- fix(keycardai-oauth): merge and deduplicate authorize URL queries (#72)
|
|
22
|
+
- Co-authored-by: devin-ai-keycard <devin-ai@keycard.ai>
|
|
23
|
+
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
24
|
+
|
|
18
25
|
## 0.8.0-keycardai-oauth (2026-11-23)
|
|
19
26
|
|
|
20
27
|
|
|
@@ -15,7 +15,7 @@ module Keycardai
|
|
|
15
15
|
# @param code_challenge_method [String] the method the challenge was derived with
|
|
16
16
|
# @param scope [String, nil] space-separated scopes
|
|
17
17
|
# @param state [String, nil] CSRF state value
|
|
18
|
-
# @param resources [Array<String>] RFC 8707 resource indicators; each
|
|
18
|
+
# @param resources [Array<String>] RFC 8707 resource indicators; each distinct value
|
|
19
19
|
# becomes its own resource parameter, and the authorization server binds
|
|
20
20
|
# them into the authorization code at authorize time
|
|
21
21
|
# @return [String] the authorize URL
|
|
@@ -32,11 +32,18 @@ module Keycardai
|
|
|
32
32
|
}.compact
|
|
33
33
|
|
|
34
34
|
uri = URI(authorization_endpoint)
|
|
35
|
-
|
|
36
|
-
uri.query = uri.query
|
|
35
|
+
sdk_params = params.to_a + Array(resources).uniq.map { |resource| ["resource", resource] }
|
|
36
|
+
uri.query = merge_authorize_query(uri.query, sdk_params)
|
|
37
37
|
uri.to_s
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
def self.merge_authorize_query(query, sdk_params)
|
|
41
|
+
sdk_keys = sdk_params.map(&:first)
|
|
42
|
+
inherited = URI.decode_www_form(query.to_s).reject { |pair| sdk_keys.include?(pair.first) }
|
|
43
|
+
URI.encode_www_form(inherited + sdk_params)
|
|
44
|
+
end
|
|
45
|
+
private_class_method :merge_authorize_query
|
|
46
|
+
|
|
40
47
|
# Exchange an authorization code for a token (RFC 6749 §4.1.3). A public
|
|
41
48
|
# client sends its client_id in the body. A confidential client
|
|
42
49
|
# authenticates with HTTP Basic and omits client_id from the body. A
|