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: Token create & delete from CLI #39

Merged
merged 23 commits into from
Feb 21, 2024
Merged

Conversation

codekeyz
Copy link
Collaborator

@codekeyz codekeyz commented Feb 8, 2024

@codekeyz codekeyz self-assigned this Feb 8, 2024
@codekeyz codekeyz added the enhancement New feature or request label Feb 8, 2024
@codekeyz codekeyz force-pushed the feat/auth-token-man-from-cli branch from fe75025 to 136d5ba Compare February 12, 2024 02:00
@codekeyz codekeyz marked this pull request as ready for review February 12, 2024 04:22
@codekeyz
Copy link
Collaborator Author

Creating Token

$ globe token create --name="Token" --expiry="2012-02-12" --project 8325e5a6-e419-45cb-99bd-3549880b1b26

or

$ globe token create --name="Token" --expiry="2012-02-12"
Select projects to associate token with:
❯ ◯  pizza-store
  ◯  zomato
  ◯  blog-backend

Terminal display when token created

$ globe token create --name="Token" --expiry="2012-02-12"
Select projects to associate token with: [zomato, pizza-app]
✓ Here's your token:
ID: 5c65febd-0185-4dca-9032-a4e3bdc8be4b
Token: foo-bar.token-goes.here (1.8s)

Terminal display when invalid expiry format

$ globe token create --name="Token" --expiry="2012"
Invalid date format.
Date format should be 2012-02-27 or 2012-02-27 13:27:00

Deleting Token

$ globe token delete --tokenId="5c65febd-0185-4dca-9032-a4e3bdc8be4b"
Screen.Recording.2024-02-12.at.11.14.12.AM.mov

@codekeyz codekeyz requested review from lesnitsky and removed request for lesnitsky February 12, 2024 11:35
@codekeyz codekeyz force-pushed the feat/auth-token-man-from-cli branch from 15f81e9 to 5e5f602 Compare February 14, 2024 10:39
@codekeyz
Copy link
Collaborator Author

@codekeyz
Copy link
Collaborator Author

This is no longer blocked, @lesnitsky we can proceed with review.

@codekeyz codekeyz requested a review from lesnitsky February 19, 2024 14:32
@lesnitsky
Copy link
Contributor

docs/cli/commands should mention this new API as well.

@lesnitsky
Copy link
Contributor

We'd also need a way to list tokens and see what projects a specific token has access to. Do you want to take care of it in this PR or separately?

@codekeyz
Copy link
Collaborator Author

We'd also need a way to list tokens and see what projects a specific token has access to. Do you want to take care of it in this PR or separately?

Yeah, we'll have it in here.

@codekeyz codekeyz requested a review from lesnitsky February 21, 2024 16:28
@codekeyz codekeyz requested a review from Salakar February 21, 2024 16:49
docs/cli/commands/token.mdx Outdated Show resolved Hide resolved
docs/cli/commands/token.mdx Outdated Show resolved Hide resolved
docs/cli/commands/token.mdx Outdated Show resolved Hide resolved
docs/cli/commands/token.mdx Outdated Show resolved Hide resolved
@codekeyz codekeyz removed the request for review from Salakar February 21, 2024 19:58
@codekeyz codekeyz requested a review from exaby73 February 21, 2024 20:04
Copy link
Contributor

@exaby73 exaby73 left a comment

Choose a reason for hiding this comment

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

LGTM

@codekeyz codekeyz merged commit e87e5a0 into main Feb 21, 2024
7 checks passed
@codekeyz codekeyz deleted the feat/auth-token-man-from-cli branch February 21, 2024 20:06
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
Development

Successfully merging this pull request may close these issues.

3 participants