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

feat: ensure interactive login API key is valid format #797

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Apr 14, 2023

Description of change

This creates a newtype for the api-key on the client side, so we can maintain that it is always a valid api-key. We should extend this type to also be usable in the auth crate in the future. Scoped down to validating interactive login, see comment.

Closes #779

How Has This Been Tested (if applicable)?

Tested logging in interactively with valid and invalid keys (for example from an invalid paste command).

@oddgrd
Copy link
Contributor Author

oddgrd commented Apr 14, 2023

On second thought, this will break the flow of setting a jwt as apikey for local deployer runs. I may scope this down to validating the login input. 🤔

@oddgrd oddgrd changed the title feat: ensure API key is valid feat: ensure interactive login API key is valid format Apr 14, 2023
@oddgrd oddgrd merged commit 408a4c5 into shuttle-hq:main Apr 24, 2023
@oddgrd oddgrd deleted the feat/parse-api-key branch April 24, 2023 12:59
oddgrd added a commit that referenced this pull request Apr 27, 2023
* feat: ensure API key is valid

* revert: scope down to validating interactive login
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.

[Bug]: Cargo shuttle Error: failed to make get request
1 participant