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 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)
Click to show internal directories.
Click to hide internal directories.