Skip to content
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

Report host for invalid tokens #10

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

DavidStirling
Copy link
Member

An issue with the current get command is that if your token expires it's not immediately obvious which server that token was for.

To solve this I've modified the error message to include the server name.

Before:

> omero_user_token get
ERROR: Token is invalid!

After:

> omero_user_token get
ERROR: Token for my.omero.server is invalid!

Also fixed a typo in the setter message

@DavidStirling DavidStirling requested a review from sbesson February 3, 2025 10:48
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omero@search-test:~$ omero_user_token get
ERROR: Token is invalid!
omero@search-test:~$ pip install omero_user_token-0.3.0.post1.dev28154048-py2.py3-none-any.whl 
...
Successfully installed omero-user-token-0.3.0.post1.dev28154048

[notice] A new release of pip is available: 23.3.1 -> 25.0
[notice] To update, run: pip install --upgrade pip
omero@search-test:~$ omero_user_token get
ERROR: Token for localhost is invalid!

Looks good. Should we aim to get this released as 0.1.2 ?

Note this package needs a bit of modernisation in terms of build and I should probably adjust #8 accordingly. At minimum, should we remove setup.cfg so that we don't create wheels that pretend they are Python 2 compatible for the patch release?

@DavidStirling
Copy link
Member Author

Thanks @sbesson, a release isn't essential but it's probably worth trying to integrate #8. As that PR also adds support for custom token directories I'd suggest that we handle modernising the setup/actions scripts in it's own PR after getting that merged.

@sbesson
Copy link
Member

sbesson commented Feb 3, 2025

Thanks @DavidStirling. I'll get this in and assign you to the review of #8. Then we can look into updating the build system before a release

@sbesson sbesson merged commit d74f7d1 into glencoesoftware:master Feb 3, 2025
6 checks passed
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 this pull request may close these issues.

None yet

2 participants