credentials

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear() error

Clear deletes the credentials file.

func Path

func Path() string

Path returns the credentials file path (~/.config/adapto/credentials.json).

func Save

func Save(creds *Credentials) error

Save writes credentials as JSON with 0600 permissions.

Types

type Credentials

type Credentials struct {
	AccessToken  string `json:"access_token,omitempty"`
	RefreshToken string `json:"refresh_token,omitempty"`
	TenantID     string `json:"tenant_id,omitempty"`
}

Credentials holds persisted authentication data.

func Load

func Load() (*Credentials, error)

Load reads and parses the credentials file. Returns empty Credentials if the file doesn't exist.

Jump to

Keyboard shortcuts

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