Skip to content

[BUG] get_user_token() AttributeError: module 'tb_rest_client.models.models_ce' has no attribute 'JWTTokenPair' #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tacensTECSOL opened this issue Feb 14, 2023 · 1 comment · Fixed by #109

Comments

@tacensTECSOL
Copy link

Tested on latest commit 0066e0f

Sample code:

from tb_rest_client import RestClientPE
from tb_rest_client.models.models_pe import *

with RestClientPE(url) as tb:
    tb.login("user", "password")
    user_id = UserId(id="target_id", entity_type="USER")
    user_token = tb.get_user_token(user_id)

image

@tacensTECSOL
Copy link
Author

For those looking for a dirty workaround:

user_id = UserId(id="target_id", entity_type="USER")
res = tb.user_controller.get_user_token_using_get(user_id=user_id.id, _preload_content=False)
data = json.loads(res.data)

@samson0v samson0v linked a pull request Feb 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant