refactor(auth): drop jwt exchange for api token - #158
Open
zfarrell wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Verified the removal is complete and consistent: no remaining references to hotdata._auth, _TokenManager, TokenExchangeError, or HOTDATA_DISABLE_JWT_EXCHANGE outside the CHANGELOG/test narrative; .openapi-generator-ignore still lists the surviving hand-written modules; the template and generated configuration.py stay in sync and both are pinned by tests/test_api_token_auth.py.
Two things I checked specifically:
test_jwt_opt_out_env_var_is_inertuses"0", which is the value the old code treated as non-affirmative — so it would have triggered a mint and tripped_no_network. It's a real regression pin, not a tautology.- The inverted regen guard in
.github/workflows/regenerate.ymlscans the full source for the exchange needles and AST-checks thatapi_keyis not a property and is assigned in__init__, which covers the reintroduction paths the old guard covered in the other direction.
CI checks were still queued/in progress when this review started, so I have not seen the unit or integration results.
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.
Deprecates the API-token → JWT key exchange: the configured
api_keyis now sent verbatim asAuthorization: Bearer <token>, sohotdata/_auth.py(the_TokenManagerminting fromPOST /v1/auth/jwtand refreshing via therefresh_tokengrant) is gone andConfiguration.api_keyis a plain attribute again.The mustache template,
.openapi-generator-ignore, and the regen workflow's safety gate are updated in the same change so a regeneration can't reintroduce the exchange.RefreshApi(POST /v1/refresh) is untouched — it is connection schema/data refresh, unrelated to refresh tokens.