fix(keycardai-oauth): add client_assertion kwargs to sync exchange_token overload - #162
Merged
Merged
Conversation
…ken overload The sync exchange_token kwargs overload was missing the client_assertion and client_assertion_type parameters that the async overload declares. The runtime path already accepted them via **token_exchange_args; this aligns the typed surface so type checkers and IDEs accept the kwargs on the sync client too. ECO-41.
…ken kwargs overloads TokenExchangeRequest defaults subject_token_type to the access-token type, but both kwargs overloads declared it required. The overloads now mark it optional so the typed surface matches the model default.
Contributor
📦 Release PreviewThis analysis shows the expected release impact: 📈 Expected Version Changes📋 Package Details[
{
"package_name": "keycardai-oauth",
"package_dir": "packages/oauth",
"has_changes": true,
"current_version": "0.18.0",
"next_version": "0.18.1",
"increment": "PATCH"
}
]📝 Changelog PreviewThis comment was automatically generated by the release preview workflow. |
Contributor
📦 Release PreviewThis analysis shows the expected release impact: 📈 Expected Version Changes📋 Package Details[
{
"package_name": "keycardai-oauth",
"package_dir": "packages/oauth",
"has_changes": true,
"current_version": "0.18.0",
"next_version": "0.18.1",
"increment": "PATCH"
}
]📝 Changelog PreviewThis comment was automatically generated by the release preview workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves ECO-41 (token-exchange spec divergence, keycard-sdk-spec #20).
Two typed-surface fixes to
exchange_tokenkwargs overloads (runtime behavior unchanged; kwargs already flow intoTokenExchangeRequest):Client.exchange_tokenkwargs overload was missingclient_assertionandclient_assertion_type, which the async overload already declares. Sync now matches async.subject_token_typeas required even thoughTokenExchangeRequestdefaults it to the access-token type. The overloads now mark it optional, matching the model and the other SDKs.264 oauth tests pass, ruff clean. Single package scope, squash is fine.