You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "jiengup (via GitHub)" <gi...@apache.org> on 2026/09/13 17:18:06 UTC

[I] Python SDK: return identity details from password and PAT login [iggy]

jiengup opened a new issue, #4167:
URL: https://github.com/apache/iggy/issues/4167

   ### Description
   
   The Rust SDK returns `IdentityInfo` from both username/password login and personal access token login:
   
   ```rust
   async fn login_user(
       &self,
       username: &str,
       password: &str,
   ) -> Result<IdentityInfo, IggyError>;
   
   async fn login_with_personal_access_token(
       &self,
       token: &str,
   ) -> Result<IdentityInfo, IggyError>;
   ```
   
   The Python SDK currently discards the value returned by `login_user()` and has no manual `login_with_personal_access_token()` method. Python callers therefore cannot obtain the authenticated user ID or the access token information returned by HTTP login.
   
   This covers B10 and B12 of the Python SDK parity work tracked in #3893.
   
   ### Affected area / component
   
   Python SDK
   
   ### Proposed solution
   
   - Add Python wrappers for `IdentityInfo` and `TokenInfo`, following the existing wrapper pattern in `foreign/python/src/user.rs`.
   - Expose:
     - `IdentityInfo.user_id`
     - `IdentityInfo.access_token: TokenInfo | None`
     - `TokenInfo.token`
     - `TokenInfo.expiry`
   - Register the new classes in `foreign/python/src/lib.rs`.
   - Change `login_user()` to return `IdentityInfo` instead of discarding it.
   - Add `login_with_personal_access_token()` and return the same `IdentityInfo` wrapper.
   - Avoid exposing token values through `repr()` or diagnostic output.
   - Regenerate `foreign/python/apache_iggy.pyi`.
   - Add tests for username/password login over TCP and HTTP, including the transport-specific `access_token` value.
   - Add a successful PAT login test using a token minted out of band by the test setup, so this issue does not depend on exposing the PAT creation API.
   
   Creating, listing, and deleting personal access tokens remain outside this issue.
   
   ### Alternatives considered
   
   Return only the numeric user ID. This would continue to discard the HTTP access-token details present in the Rust API.
   
   ### Contribution
   
   - [ ] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [x] I think this could be a good first issue for a new contributor
   


-- 
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: commits-unsubscribe@iggy.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Python SDK: return identity details from password and PAT login [iggy]

Posted by "Mukezh (via GitHub)" <gi...@apache.org>.
Mukezh commented on issue #4167:
URL: https://github.com/apache/iggy/issues/4167#issuecomment-5664512644

   Hey @jiengup! I took a look through the issue and the existing Python SDK implementation. The changes around `IdentityInfo`/`TokenInfo`, `login_user()`, PAT login, and the tests look pretty clear.
   
   I don't think it is assigned to anyone, I’d like to work on this. Could you assign it to me please?
   


-- 
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: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Python SDK: return identity details from password and PAT login [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio closed issue #4167: Python SDK: return identity details from password and PAT login
URL: https://github.com/apache/iggy/issues/4167


-- 
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: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Python SDK: return identity details from password and PAT login [iggy]

Posted by "jiengup (via GitHub)" <gi...@apache.org>.
jiengup commented on issue #4167:
URL: https://github.com/apache/iggy/issues/4167#issuecomment-5664577543

   > Hey [@jiengup](https://github.com/jiengup)! I took a look through the issue and the existing Python SDK implementation. The changes around `IdentityInfo`/`TokenInfo`, `login_user()`, PAT login, and the tests look pretty clear.
   > 
   > I don't think it is assigned to anyone, I’d like to work on this. Could you assign it to me please?
   
   Sure, @hubcio please assign it to him, I'll review the following PR.


-- 
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: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Python SDK: return identity details from password and PAT login [iggy]

Posted by "slbotbm (via GitHub)" <gi...@apache.org>.
slbotbm commented on issue #4167:
URL: https://github.com/apache/iggy/issues/4167#issuecomment-5664580014

   @Mukezh assigned


-- 
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: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org