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

Add support for shorter lifetimes on tokens #828

Open
shreddd opened this issue Dec 10, 2024 · 2 comments · May be fixed by #829
Open

Add support for shorter lifetimes on tokens #828

shreddd opened this issue Dec 10, 2024 · 2 comments · May be fixed by #829
Labels
enhancement New feature or request

Comments

@shreddd
Copy link
Collaborator

shreddd commented Dec 10, 2024

The default ACCESS_TOKEN_EXPIRES is set to 24 hours, but in some cases we may want to use shorter lived tokens, especially for testing or one off short-lived tasks.

Consider adding an expires param to the /users/token endpoint to specify a shorter lifetime. Also enable support for seconds in the expires information returned.

@shreddd shreddd added the enhancement New feature or request label Dec 10, 2024
@aclum
Copy link
Contributor

aclum commented Dec 10, 2024

I dont know user that is advocating for a shorter token.

@shreddd
Copy link
Collaborator Author

shreddd commented Dec 12, 2024

To clarify - this would address some of the testing issues with the nmdc-automation code where it needs to test an expiring token / token renewal (currently 24 hours). It would allow for clients to specify shorter lived tokens which would be useful for testing, or for systems where we only need to do one off things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants