auth

package
v0.11.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteHostCredentials

func DeleteHostCredentials(host string) error

func GetValidToken

func GetValidToken(ctx context.Context, host string) (string, error)

func Login

func Login(ctx context.Context, host string) error

func Logout

func Logout(host string) error

func SaveConfig

func SaveConfig(cfg *Config) error

func SaveCredentials

func SaveCredentials(creds Credentials) error

func SaveHostCredentials

func SaveHostCredentials(host string, hostCreds HostCredentials) error

Types

type Config

type Config struct {
	Host string `json:"host"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type Credentials

type Credentials map[string]HostCredentials

func LoadCredentials

func LoadCredentials() (Credentials, error)

type HostCredentials

type HostCredentials struct {
	AccessToken     string            `json:"access_token"`
	RefreshToken    string            `json:"refresh_token"`
	ExpiresAt       int64             `json:"expires_at"`
	QueryParameters map[string]string `json:"query_parameters,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL