Files
coder/docs/cli/coder_tokens.md
Kira Pilot 71d1e63af0 feat: add ability to name tokens (#6365)
* add tokens switch

* reorged TokensPage

* using Trans component for description

* using Trans component on DeleteDialog

* add owner col

* simplify hook return

* lint

* type for response

* added flag for name

* fixed auth

* lint, prettier, tests

* added unique index for login type token

* remove tokens by name

* better check for unique constraint

* docs

* test: Fix dbfake to insert token name

* fix doc tests

* Update cli/tokens.go

Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>

* Update coderd/database/migrations/000102_add_apikey_name.down.sql

Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>

* add more specificity to IsUniqueViolation check

* fix tests

* Fix AutorizeAllEndpoints

* rename migration

---------

Co-authored-by: Steven Masley <stevenmasley@coder.com>
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
2023-03-02 09:39:38 -08:00

36 lines
716 B
Markdown

<!-- DO NOT EDIT | GENERATED CONTENT -->
# coder tokens
Tokens are used to authenticate automated clients to Coder.
## Usage
```console
coder tokens [flags]
```
## Examples
```console
- Create a token for automation:
$ coder tokens create
- List your tokens:
$ coder tokens ls
- Remove a token by ID:
$ coder tokens rm WuoWs4ZsMX
```
## Subcommands
| Name | Purpose |
| -------------------------------------------- | -------------- |
| [<code>create</code>](./coder_tokens_create) | Create a token |
| [<code>list</code>](./coder_tokens_list) | List tokens |
| [<code>remove</code>](./coder_tokens_remove) | Delete a token |