switch from client_secret to client_secret_file

This commit is contained in:
Abel Luck 2026-02-26 11:21:33 +01:00
parent ec2cdb0700
commit a11adaa58b
4 changed files with 54 additions and 12 deletions

View file

@ -18,7 +18,7 @@ var serviceAccountCmd = &cobra.Command{
Use: "service-account",
Short: "Authenticate using client credentials (for servers)",
Long: `Authenticates using the OAuth2 client credentials flow for headless
server environments. Requires client_secret in the config file.
server environments. Requires client_secret_file in the config file.
Exits 0 on success, 1 on failure. Designed to be called from a systemd timer.`,
RunE: runServiceAccount,
}
@ -31,7 +31,7 @@ func runServiceAccount(cmd *cobra.Command, args []string) error {
ctx := context.Background()
if cfg.ClientSecret == "" {
fmt.Fprintln(os.Stderr, "Error: client_secret is required in config for service-account mode.")
fmt.Fprintln(os.Stderr, "Error: client_secret_file is required in config for service-account mode.")
os.Exit(1)
}