Versions in this module Expand all Collapse all v0 v0.3.1 Oct 30, 2026 Changes in this version + const DefaultScopes + func CacheDir() string + func Commands() *cli.Command + func ConfigDir() string + func ConfigFile() string + func DeviceFlowLogin(clientID, clientSecret, dc, scopes string) error + func EnsureAccessToken(config *AuthConfig, forceRefresh bool) (string, error) + func LoadCachedAccessToken(refreshToken string) (string, time.Time, bool) + func RefreshAccessToken(config *AuthConfig) (string, error) + func SaveCachedAccessToken(refreshToken, accessToken string, expiresIn int) error + func SaveClientConfig(clientID, clientSecret string) error + func SaveTokens(refreshToken, accessToken string, expiresIn int, ...) error + func SelfClientExchange(clientID, clientSecret, code, dc, accountsServer string) error + func TokensFile() string + type AuthConfig struct + APIDomain string + AccessToken string + AccountsURL string + ClientID string + ClientSecret string + DC string + ExpiresAt time.Time + RefreshToken string + Scopes string + Source string + func ResolveAuth() (*AuthConfig, error) + func (c *AuthConfig) TokenValid() bool