auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package auth stores bot tokens out of plaintext. The OS keyring (macOS Keychain, Linux Secret Service, Windows Credential Manager) is primary; an encrypted file is the fallback for headless hosts where no keyring is available (GOAL.md §1).

Index

Constants

View Source
const Service = "linkedin-cli"

Service is the keyring service name under which tokens are stored, keyed by profile.

Variables

View Source
var ErrNotFound = errors.New("no token stored for this profile")

ErrNotFound is returned when no token is stored for a profile.

Functions

This section is empty.

Types

type Store

type Store interface {
	Set(profile, token string) error
	Get(profile string) (string, error)
	Delete(profile string) error
	// Backend names where the token currently lives ("keyring" or "file"), for doctor output.
	Backend() string
}

Store persists and retrieves a per-profile secret token.

func New

func New(dir string) Store

New returns the default token store. dir is where the encrypted fallback file lives (the config dir); it is only touched if the keyring is unreachable.

Jump to

Keyboard shortcuts

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