xalestar opened a new pull request, #4766: URL: https://github.com/apache/iggy/pull/4766
## Which issue does this PR address? Closes #4646 ## Rationale The Python SDK could log in with a personal access token but could not list or revoke one, so cleaning up tokens needed the HTTP API or another SDK. The Rust client and the C++ SDK already have both calls. ## What changed? `IggyClient` had no way to see which tokens a user holds or to delete one. It now has `get_personal_access_tokens()`, which returns a list of `PersonalAccessTokenInfo` with `name` and `expiry` (a Unix timestamp in microseconds, or `None` for a token that never expires, matching `MetadataTokenChange`), and `delete_personal_access_token(name)`. The stub is regenerated with `stub_gen`. The tests create tokens over the HTTP API with the existing `_create_personal_access_token` helper in `test_user.py`, so they do not wait on #4647. Besides the four cases in the issue, one test creates a token with a one-hour expiry and checks the listed value is in microseconds. ## Local Execution - Passed: `pytest tests/test_personal_access_token.py tests/test_user.py` (69 passed) against a local `iggy-server` built from this branch - Pre-commit hooks ran (`prek run`), all passed; `cargo clippy --all-targets -- -D warnings` clean -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
