This repository was archived by the owner on Aug 30, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork18
feat: Reveal tokens subcommand#229
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletionsci/integration/integration_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsdocs/coder.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletionsdocs/coder_tokens.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## coder tokens | ||
manage Coder API tokens for the active user | ||
### Synopsis | ||
Create and manage API Tokens for authenticating the CLI. | ||
Statically authenticate using the token value with the `CODER_TOKEN` and `CODER_URL` environment variables. | ||
### Options | ||
``` | ||
-h, --help help for tokens | ||
``` | ||
### Options inherited from parent commands | ||
``` | ||
-v, --verbose show verbose output | ||
``` | ||
### SEE ALSO | ||
* [coder](coder.md) - coder provides a CLI for working with an existing Coder Enterprise installation | ||
* [coder tokens create](coder_tokens_create.md) - create generates a new API token and prints it to stdout | ||
* [coder tokens ls](coder_tokens_ls.md) - show the user's active API tokens | ||
* [coder tokens regen](coder_tokens_regen.md) - regenerate an API token by its unique ID and print the new token to stdout | ||
* [coder tokens rm](coder_tokens_rm.md) - remove an API token by its unique ID | ||
24 changes: 24 additions & 0 deletionsdocs/coder_tokens_create.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## coder tokens create | ||
create generates a new API token and prints it to stdout | ||
``` | ||
coder tokens create [token_name] [flags] | ||
``` | ||
### Options | ||
``` | ||
-h, --help help for create | ||
``` | ||
### Options inherited from parent commands | ||
``` | ||
-v, --verbose show verbose output | ||
``` | ||
### SEE ALSO | ||
* [coder tokens](coder_tokens.md) - manage Coder API tokens for the active user | ||
25 changes: 25 additions & 0 deletionsdocs/coder_tokens_ls.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## coder tokens ls | ||
show the user's active API tokens | ||
``` | ||
coder tokens ls [flags] | ||
``` | ||
### Options | ||
``` | ||
-h, --help help for ls | ||
-o, --output string human | json (default "human") | ||
``` | ||
### Options inherited from parent commands | ||
``` | ||
-v, --verbose show verbose output | ||
``` | ||
### SEE ALSO | ||
* [coder tokens](coder_tokens.md) - manage Coder API tokens for the active user | ||
24 changes: 24 additions & 0 deletionsdocs/coder_tokens_regen.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## coder tokens regen | ||
regenerate an API token by its unique ID and print the new token to stdout | ||
``` | ||
coder tokens regen [token_id] [flags] | ||
``` | ||
### Options | ||
``` | ||
-h, --help help for regen | ||
``` | ||
### Options inherited from parent commands | ||
``` | ||
-v, --verbose show verbose output | ||
``` | ||
### SEE ALSO | ||
* [coder tokens](coder_tokens.md) - manage Coder API tokens for the active user | ||
24 changes: 24 additions & 0 deletionsdocs/coder_tokens_rm.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## coder tokens rm | ||
remove an API token by its unique ID | ||
``` | ||
coder tokens rm [token_id] [flags] | ||
``` | ||
### Options | ||
``` | ||
-h, --help help for rm | ||
``` | ||
### Options inherited from parent commands | ||
``` | ||
-v, --verbose show verbose output | ||
``` | ||
### SEE ALSO | ||
* [coder tokens](coder_tokens.md) - manage Coder API tokens for the active user | ||
34 changes: 27 additions & 7 deletionsinternal/cmd/tokens.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.