8000 feat: variable token expiration by grutt · Pull Request #670 · hatchet-dev/hatchet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: variable token expiration #670

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 4 commits into from
Jul 1, 2024
Merged

feat: variable token expiration #670

merged 4 commits into from
Jul 1, 2024

Conversation

grutt
Copy link
Contributor
@grutt grutt commented Jun 28, 2024

Description

3 month expiration was cumbersome for some folks, this PR makes the expiration duration configurable for tokens created with the CLI and the Dashboard

Type of change

  • New feature (non-breaking change which adds functionality)

What's Changed

  • exposes expiresIn option on the create token api
  • adds 100 years (default), 1 year, 3 month options for tokens generated through the dashboard
  • adds expiresIn flag for tokens generated through CLI

Copy link
vercel bot commented Jun 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2024 3:29pm

type: string
description: The duration for which the token is valid.
x-oapi-codegen-extra-tags:
validate: "omitnil,duration"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may be losing my mind, but this validator seems to not accept the things it says it accepts. It will not accept y or M for example.

	DurationErr    = "Invalid duration. Durations must be in the format <number><unit>, where unit is one of: 's', 'm', 'h', 'd', 'w', 'M', 'y'"

I thought we already addressed this but I can't find the PR.

@grutt grutt requested a review from abelanger5 June 28, 2024 13:29
@grutt grutt enabled auto-merge (squash) July 1, 2024 15:45
@grutt grutt merged commit 8a8a033 into main Jul 1, 2024
25 checks passed
@grutt grutt deleted the feat--api-token-durration branch July 1, 2024 15:47
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.

2 participants
0