diff options
| author | Simen A. W. Olsen <hello@simenandre.no> | 2026-11-03 22:08:49 +0100 |
|---|---|---|
| committer | Simen A. W. Olsen <hello@simenandre.no> | 2026-11-03 22:08:49 +0100 |
| commit | bef3ccf4521d4ed431f3cdfc66e618c619ce28e4 (patch) | |
| tree | ef8e6ff90fed4b27d4f2cfd082106f2efdb38ca5 /fikenauth/oauth.go | |
| parent | a5491c9dccdf4678bf3b4380d208cf2562afeee4 (diff) | |
| download | fiken-43dc4f31b0d28b817cf74c2e91c5f31471214349.tar.gz fiken-43dc4f31b0d28b817cf74c2e91c5f31471214349.zip | |
fikenconfig keeps an OAuth app and a grant per account in ~/.config/fiken, and finds the account that reaches a company. Renewing a grant takes a lock, so programs sharing it take turns.
Diffstat (limited to 'fikenauth/oauth.go')
| -rw-r--r-- | fikenauth/oauth.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fikenauth/oauth.go b/fikenauth/oauth.go index f899ccb..79d90ea 100644 --- a/fikenauth/oauth.go +++ b/fikenauth/oauth.go @@ -65,19 +65,19 @@ func (e *Error) AccessDenied() bool { return e.Code == "access_denied" } func (c Config) Validate() error { var missing []string if c.ClientID == "" { - missing = append(missing, "fiken.client_id") + missing = append(missing, "client_id") } if c.ClientSecret == "" { - missing = append(missing, "fiken.client_secret_file (or FIKEN_CLIENT_SECRET)") + missing = append(missing, "client_secret") } if len(missing) > 0 { return fmt.Errorf( - "no Fiken OAuth app configured: set %s. Create the app in Fiken under "+ + "no Fiken OAuth app configured: missing %s. Create the app in Fiken under "+ "Brukerinnstillinger -> API, registering %s as the redirect URL", strings.Join(missing, " and "), c.redirectURL()) } if _, err := url.Parse(c.redirectURL()); err != nil { - return fmt.Errorf("fiken.redirect_url %q is not a URL: %w", c.redirectURL(), err) + return fmt.Errorf("redirect URL %q is not a URL: %w", c.redirectURL(), err) } return nil } |
