mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat!: add --default-token-lifetime (#14631)
This commit is contained in:
Generated
+1
@@ -396,6 +396,7 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
"disable_expiry_refresh": true,
|
||||
"max_token_lifetime": 0
|
||||
},
|
||||
|
||||
Generated
+5
-1
@@ -1902,6 +1902,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
"disable_expiry_refresh": true,
|
||||
"max_token_lifetime": 0
|
||||
},
|
||||
@@ -2328,6 +2329,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
"disable_expiry_refresh": true,
|
||||
"max_token_lifetime": 0
|
||||
},
|
||||
@@ -4772,6 +4774,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
```json
|
||||
{
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
"disable_expiry_refresh": true,
|
||||
"max_token_lifetime": 0
|
||||
}
|
||||
@@ -4781,7 +4784,8 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------ | ------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `default_duration` | integer | false | | Default duration is for api keys, not tokens. |
|
||||
| `default_duration` | integer | false | | Default duration is only for browser, workspace app and oauth sessions. |
|
||||
| `default_token_lifetime` | integer | false | | |
|
||||
| `disable_expiry_refresh` | boolean | false | | Disable expiry refresh will disable automatically refreshing api keys when they are used from the api. This means the api key lifetime at creation is the lifetime of the api key. |
|
||||
| `max_token_lifetime` | integer | false | | |
|
||||
|
||||
|
||||
Generated
+11
@@ -910,6 +910,17 @@ Periodically check for new releases of Coder and inform the owner. The check is
|
||||
|
||||
The maximum lifetime duration users can specify when creating an API token.
|
||||
|
||||
### --default-token-lifetime
|
||||
|
||||
| | |
|
||||
| ----------- | ------------------------------------------ |
|
||||
| Type | <code>duration</code> |
|
||||
| Environment | <code>$CODER_DEFAULT_TOKEN_LIFETIME</code> |
|
||||
| YAML | <code>defaultTokenLifetime</code> |
|
||||
| Default | <code>168h0m0s</code> |
|
||||
|
||||
The default lifetime duration for API tokens. This value is used when creating a token without specifying a duration, such as when authenticating the CLI or an IDE plugin.
|
||||
|
||||
### --swagger-enable
|
||||
|
||||
| | |
|
||||
|
||||
Reference in New Issue
Block a user