Documentation
¶
Overview ¶
Package auth manages spoo CLI credentials and the device-auth login flow.
Index ¶
Constants ¶
View Source
const ( // AppID matches the spoo-cli entry in the backend's config/apps.yaml. AppID = "spoo-cli" // CallbackAddr is fixed: the backend validates redirect_uri by exact // match against the registry, so a random port would be rejected. CallbackAddr = "127.0.0.1:53682" CallbackPath = "/callback" )
Variables ¶
View Source
var ErrNotLoggedIn = errors.New("not logged in — run `spoo auth login`")
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type DeviceFlow ¶
type DeviceFlow struct {
APIBase string
OpenBrowser func(url string) error
Out io.Writer // progress messages (stderr)
}
DeviceFlow drives the spoo.me connected-apps device authorization: loopback server → browser consent → one-time code.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists credentials in the OS keyring, falling back to a 0600 file in the config dir when no keyring is available.
func (*Store) Load ¶
func (s *Store) Load() (*Credentials, error)
func (*Store) Save ¶
func (s *Store) Save(c Credentials) error
Click to show internal directories.
Click to hide internal directories.