switch from client_secret to client_secret_file
This commit is contained in:
parent
ec2cdb0700
commit
a11adaa58b
4 changed files with 54 additions and 12 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue