feat: add flag for token lifetime (#5385)

This commit is contained in:
Garrett Delfosse
2022-12-12 15:39:31 -05:00
committed by GitHub
parent 760419a965
commit 40a5c0476f
9 changed files with 136 additions and 50 deletions
+6
View File
@@ -424,6 +424,12 @@ func newConfig() *codersdk.DeploymentConfig {
Flag: "update-check",
Default: flag.Lookup("test.v") == nil && !buildinfo.IsDev(),
},
MaxTokenLifetime: &codersdk.DeploymentConfigField[time.Duration]{
Name: "Max Token Lifetime",
Usage: "The maximum lifetime duration for any user creating a token.",
Flag: "max-token-lifetime",
Default: 24 * 30 * time.Hour,
},
}
}