authstore

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package authstore persists the OIDC tokens `tiny login` obtains. One JSON file, 0600, under the user config dir — the CLI equivalent of a browser session. Developer keys never touch this store.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotLoggedIn = errors.New("not logged in — run `tiny login`")

Functions

func Clear

func Clear() error

func Save

func Save(c *Credentials) error

Types

type Credentials

type Credentials struct {
	AccessToken  string    `json:"access_token"`
	RefreshToken string    `json:"refresh_token"`
	ExpiresAt    time.Time `json:"expires_at"`
	// Workspace is the slug picked at login for accounts with several
	// workspaces; empty means "let the server use my only one".
	Workspace string `json:"workspace,omitempty"`
	// Issuer records which realm issued the tokens so login/refresh
	// stay consistent across --auth-url overrides.
	Issuer string `json:"issuer"`
}

func Load

func Load() (*Credentials, error)

Jump to

Keyboard shortcuts

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