Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.