Documentation
¶
Overview ¶
Package credentials persists and loads ~/.authio/credentials.toml.
File format (TOML-ish but parsed by hand to avoid an external dep):
[default] api_key = "sk_live_..." project_id = "proj_..." api_url = "https://api.authio.com" auth_core_url = "https://identity.authio.com"
File mode is 0600. We store profiles by name; "default" is the implicit profile when none is specified via --profile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
Path string
}
func DefaultStore ¶
func (*Store) ActiveProfile ¶
ActiveProfile returns the profile selected via `authio env use`, defaulting to "default" when none has been chosen.
func (*Store) Names ¶
Names returns the profile names present in the credentials file, with "default" first (when present) and the rest alphabetical. A missing file yields an empty slice and no error — callers treat "nothing configured" the same as "file absent".
func (*Store) SetActiveProfile ¶
SetActiveProfile persists the chosen profile. The profile must already exist in the credentials file.