Skip to content

chore: pass lifetime directly into api key generate #11715

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

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Jan 19, 2024

This was pulled out of #11609. I am trying to split up that PR so we can review and merge more easily.

Rather than passing all the deployment values, pass just the lifetime since that is all we use. This is to make it easier to generate API keys as part of the oauth flow (otherwise we will need send the deployment values into the identity provider).

I also added and fixed a test for when the lifetime is set and the default and expiration are unset (was just missing a multiplication by time.Second to use seconds instead of nanoseconds or whatever the default is).

Rather than passing all the deployment values.  This is to make it
easier to generate API keys as part of the oauth flow.

I also added and fixed a test for when the lifetime is set and the
default and expiration are unset.

Co-authored-by: Steven Masley <stevenmasley@gmail.com>
@code-asher code-asher force-pushed the asher/api-key-lifetime branch from 5596f95 to 0b0b03f Compare January 19, 2024 21:05
@code-asher code-asher marked this pull request as ready for review January 19, 2024 21:22
@code-asher code-asher requested review from sreya and Emyrk January 19, 2024 21:23
@Emyrk
Copy link
Member

Emyrk commented Jan 22, 2024

This is fine to unblock, we should do this long term: #11693

@code-asher code-asher merged commit 16c6cef into main Jan 22, 2024
@code-asher code-asher deleted the asher/api-key-lifetime branch January 22, 2024 20:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants